我对 mootools 不太熟悉,但我正在实现一个图像滑块,我想在其上添加一些标题。到目前为止,这是可行的,但是当图像滑开时,标题仍然存在……如果下一张图片与新标题一起滑动,则标题会滑过前一张……这是隐藏图像的代码段,并且我想我也可以在哪里隐藏字幕......
initialize: function(menu, images, loader, options){
this.parent(menu, options);
this.images = $(images);
this.imagesitems = this.images.getChildren().fade('hide');
$(loader).fade('in');
new Asset.images(this.images.getElements('img').map(function(el) { return el.setStyle('display', 'none').get('src'); }), { onComplete: function() {
this.loaded = true;
$(loader).fade('out');
if (this.current) this.show(this.items.indexOf(this.current));
else if (this.options.auto && this.options.autostart) this.progress();
}.bind(this) });
if ($type(this.options.transition) != 'function') this.options.transition = $lambda(this.options.transition);
},
//And here is the HTML (and PHP-Codeigniter):
<li class="relative">
<p class="slogan"><span class="highlight"><?=$latestItem->slogan?><br/><a href="#">Lees meer »</a></span></p>
<img src="<?= $latestItem->picture ?>" alt="<?=$latestItem->title ?>" title="<?=$latestItem->title ?>" />
</li>
谁能帮我弄清楚如何让字幕与相应的图像一起消失?