当我将鼠标悬停在“.block1”上时,我试图切换“.image1”的可见性,但我没有任何成功。我错过了什么?谁能帮我吗?
HTML:
<div class="container">
<div class="wrapper">
<section class="images">
<article id="image" class="image1">
<div class="img"></div>
</article>
<article id="image" class="image2">
<div class="img"></div>
</article>
<article id="image" class="image3">
<div class="img"></div>
</article>
</section>
<ul class="blocks">
<li class="block1">Image1
</li>
<li class="block2">Image2
</li>
<li class="block3">Image3
</li>
</ul>
</div>
</div>
脚本:
$(document).ready(function () {
$(".block1").hover(function(){
$(".image1").fadeTo("slow", 1);
},function(){
$(".image1").fadeTo("slow", 0);
});
});
这是我的小提琴