【发布时间】:2011-05-23 15:25:36
【问题描述】:
我将如何获得缩略图的默认幻灯片,例如 gallerific!当用户点击缩略图时,有 4-5 张幻灯片(比如说,一朵花的五张不同的照片)然后是幻灯片。
或者,或者,如何拥有多个画廊,以及一个在幻灯片中显示每个画廊的第一张图像的脚本?
谢谢@thstark。这会处理上述请求。有人可以建议如何使用NIVO Slider 并使用它的自动播放(用于 3 张大图像)和标题吗?
或者这是我尝试更改 this thread 中的建议脚本以旋转 3 个大图像:
<div id="main">
<div id="pages">
<div class="navi"></div>
<div class="scrollable">
<div class="items">
<div class="item"><img id = "img1" class= "active" src= "images/main_img1.jpg"></img></div>
<div class="item"><img id = "img2" src= "images/main_img2.jpg"></img></div>
<div class="item"><img id = "img3" src= "images/main_img3.jpg"></img></div>
<div class="item"><img id = "img4" src= "images/main_img4.jpg"></img></div>
</div>
</div></div></div></div>
current_string = $("#main img.active").attr('id');
current = current_string.charAt(3); //get the current image number
current++;
if (current > 4){ //check if current image is the last image display first image
current = 1;
}
current_string = "img" + current;
$("#main img.active).removeClass('active').fadeOut(1000, function(){ //fadeOut existing image
$("#main img").each(function(){
if($(this).attr('id') == current_string){
$(this).addClass('active').fadeIn(1000) //fadeIn next image
}
});
});
【问题讨论】:
-
Yo dawg,听说你喜欢幻灯片...
-
@Eli - 幻灯片中的幻灯片?我希望你明白这个要求的严重性。梦中的许多梦呃,我的意思是幻灯片太不稳定了!
-
因此,每个嵌套的幻灯片必须比它嵌套的幻灯片运行得更快...
-
稍有干扰,浏览器就会崩溃。
-
有人在这里打电话给Ellen Page。只有她能处理这个或Leo