幻灯片中的幻灯片
我如何拥有默认的缩略图幻灯片,例如 gallerific!当用户单击缩略图时,有 4-5 张幻灯片(例如,一朵花的五张不同的镜头)然后成为幻灯片。
或者,如何拥有许多画廊,以及一个在幻灯片中显示每个画廊的第一张图像的脚本?
谢谢@thastark。这就满足了上面的请求。有人可以建议如何使用 NIVO Slider 并使用它的自动播放(对于 3 个大图像)和标题?
或者这是我尝试更改 此线程 中的建议脚本以获得 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
}
});
});
How would I have a default slideshow of thumbnails, like gallerific! and when the user clicks the thumbnail, have 4-5 slides (say, five different takes of a flower) then be the slideshow.
Or, alternatively, how to have many galleries, and one script that displays the first image of each in a slideshow?
Thanks @thastark. That takes care of the above request. Can someone suggest how to take NIVO Slider and use it's autoplay (for the 3 big images) and caption?
OR here's my attempt at altering the suggested script in this thread to get the 3 big images rotating:
<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
}
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
即使我想要这样的东西,你也可以查看我发布的问题。
但我暂时通过使用 jQuery 对话框解决了 Nivo 滑块的问题,即我使用单击事件将滑块加载到单独的对话框中。在“slideShowEnds”上,我触发了另一个滑块的单击事件(该滑块被加载到他自己的对话框中)[对话框的宽度、高度、位置等保持不变]
Even I was wanting something like this, you can check my posted ques out.
But temporarily I solved my problem with Nivo slider by using jQuery Dialog boxes i.e. I loaded the slider on a separate dialog box with click event & on "slideShowEnds" I triggered the click event of another slider (which gets loaded in his own dialog box) [width, height , position etc of dialog boxes remain the same]
我以前使用过 jQuery 工具。不是那么小但还算不错。
这与您所说的类似(嵌套幻灯片):
http://flowplayer.org/tools/demos/scrollable/site-navigation.htm
这是描述:
http://flowplayer.org/tools/demos/scrollable/site-navigation.html
I've used jQuery Tools before. Not as small but decent.
This is similar to what you're talking about (nested slideshow):
http://flowplayer.org/tools/demos/scrollable/site-navigation.htm
Here is the description:
http://flowplayer.org/tools/demos/scrollable/site-navigation.html