I can't stop the stupid thing from firing off an event when hovering over the children of item.
I only want the event to fire via the div.item
element, not the div.itemChild
. This is driving me nuts please help.
event.stopPropigation does not work. nor does if(!$(event.source).is('itemChild'))
, for some reason is()
alway returns false.
HTML
<div id="items">
<div class="item">
<div class="itemChild">
</div>
<div class="itemChild">
</div>
</div>
</div>
JS
//on hover event for each post
$('div.item', '#items').live('mouseover mouseout', function(event){
if (event.type == 'mouseover'){
//fire mouseover handler
}
else{
//fire mouseout handler
}
});
Is there a way to stop live from firing when hovering the children of div.item
?
By the way the children of div.item
cover it completely.
Basically I want this to act like .hover() but bind to things loaded via ajax.