Javascript 单击eEvent在Jquery中自动更改事件图像

Javascript 单击eEvent在Jquery中自动更改事件图像,javascript,jquery,html,css,Javascript,Jquery,Html,Css,这是我的密码。。当我点击图像的缩略图时,图像将显示为ok。。 现在我需要自动更改图像。。不点击事件, 所以请帮助我更改此javascript <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> $(function() { $(".

这是我的密码。。当我点击图像的缩略图时,图像将显示为ok。。 现在我需要自动更改图像。。不点击事件, 所以请帮助我更改此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>

$(函数(){
$(“.image”)。单击(函数(){
var image=$(this.attr(“rel”);
$('#img').hide();
$('img').fadeIn('slow');
$('#img').html('');
$('img')。
返回false;
});
});
.img{
边框:4px#666实心;
宽度:410像素;高度:350像素;
}
.拇指{
浮动:左;
高度:60px;
宽度:80px;
填充:10px;
}
帮助完成此任务……

您可以浏览本教程