0

这是我的代码..当我单击图像的缩略图时,图像将显示没关系..现在我需要自动更改图像..而不是单击事件,所以请帮我更改此 javascript

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
         $(function() {
            $(".image").click(function() {
            var image = $(this).attr("rel");
            $('#img').hide();
            $('#img').fadeIn('slow');
            $('#img').html('<img src="' + image + '" class="img"/>');
            $('#img').
            return false;
                });
        });
</script>

<style>
.img{
border:4px #666 solid;
width:410px; height:350px;
}

.thumb{
float:left; 
height:60px;
width:80px;
padding:10px;
}
</style>

<div  id="img" ><img src="../content/ohoopee1.jpg" border="0" style="width:410px; height:350px;border:4px #666 solid;" /></div>

                    <a href="#" rel="../content/ohoopee1.jpg" class="image"><img src="../content/ohoopee1.jpg" class="thumb" border="0"/></a>
                    <a href="#" rel="../content/ohoopee2.jpg" class="image"><img src="../content/ohoopee2.jpg" class="thumb" border="0"/></a>
                    <a href="#" rel="../content/ohoopee3.jpg" class="image"><img src="../content/ohoopee3.jpg" class="thumb" border="0"/></a>
                    <a href="#" rel="../content/ohoopee4.jpg" class="image"><img src="../content/ohoopee4.jpg" class="thumb" border="0"/></a>

帮助这个......

4

1 回答 1

0

http://jonraasch.com/blog/a-simple-jquery-slideshow

你可以通过这个教程。

于 2012-06-05T09:46:57.100 回答