我正在使用一个很好的 jQuery 滑块示例:http: //papermashup.com/simple-jquery-gallery/
这是jQuery:
$(function() {
$(".image").click(function() {
var image = $(this).attr("rel");
$('#image').hide();
$('#image').fadeIn('slow');
$('#image').html('<img src="' + image + '"/>');
return false;
});
});
这是HTML
<div id="image"><img src="images/1.png" border="0"/></div>
<a href="#" rel="images/1.png" class="image"><img src="images/t1.png" class="thumb" border="0"/></a>
<a href="#" rel="images/2.png" class="image"><img src="images/t2.png" class="thumb" border="0"/></a>
<a href="#" rel="images/3.png" class="image"><img src="images/t3.png" class="thumb" border="0"/></a>
我想知道的是,如何让大图像在循环中自动淡出其余图像。当我点击一个让它从那时开始。我计划有大约 20 张左右的图像。
非常感激