我不知道如何做到這一點選擇孩子的div一類在事件處理中
我
<div class="a parent">
<div class="child">
</div>
</div>
<div class="b parent">
<div class="child">
</div>
</div>
我想這樣的事情(在僞代碼)
$(".parent").mousemove(function(){
select the `.child` which is the child of this div
})
所以當.a
被徘徊在它上面時只會選擇一個.child
,而當.b
被徘徊時它會選擇b的.child
只有
這應該包括this
或$this
或$(this)
或類似的東西..但它的混亂,我不知道從哪裏讀到它
究竟是什麼讓你困惑? jQuery函數在[文檔](http://api.jquery.com/jQuery/#jQuery1)以及[所有遍歷方法](http://api.jquery.com/category/traversing) /樹遍歷/)。花一些時間閱讀API文檔是值得的。也許[入門](http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery)教程對你也有幫助。 – 2013-03-24 11:08:48