My parent DIV will have many clickable children, so using event delegation I'm trying to capture both the childrens click and hover events on the parent DIV as they bubble up.
Now the click event bubbles fine, but I can't seem to capture the hover event. Anyone know why?
Please don't tell me the hover event doesn't bubble :)
HTML:
<div id="theParent">
<a href="#">Clicked 1</a>
<a href="#">Clicked 2</a>
<a href="#">Clicked 3</a>
<a href="#">Clicked 4</a>
<a href="#">Clicked 5</a>
</div>
jQuery:
$('#theParent').click(captureEvent).hover(captureEvent,captureEvent);
var captureEvent = function(e){
console.log(e.target);
};