我质疑如何通过jQuery选择特定对象。 以下情况:
<figure class="box col1">
<img class="fade" src="first.jpg" style="background-image: url(second.jpg)" />
<figcaption>
<div class="cenfig">
<p>
<strong>Headline</strong>
<em>Subheadline</em>
</p>
</div>
</figcaption>
文件中有几个数字。我想在图中选择img并在其上运行脚本。
问题:
是否可以在图上使用鼠标悬停仅在鼠标内部的img上运行一个函数?
选中此项以了解我的问题:http://jsfiddle.net/NuL7A/1
谢谢!
答案 0 :(得分:0)
$("figure img.fade").mouseover(function(){
//...
});