child of "this"
child of "this"
Hi all,
I'm having a little trouble with selectors here - your help would be great!
HTML:
-
<div class="pro">
<div class="msk">
</div>
</div>
<div class="pro">
<div class="msk">
</div>
</div>
Now, I would like to add a hover event for
each of the 'pro' divs, which fades out and in
that div's child .msk div.
How do I select the child .msk of
the pro that is being hovered?
I have tried:
$(this + ' .msk')
$(this ' .msk')
$('.msk') selects
both of the .msk divs.
I got it working with this: $('.msk',this)
But I don't understand why that works, so it wont do me any good in the future.
Thanks!