I have an even in jQuery, when they click the DIV it hides itself. My problem is that the SPAN it interfering with it, meaning I have to click outside of the span and exactly on the DIV.
Can I make it so when they click the DIV or any child element of that, it will do the event? I thought it would be something like $(‘.item’, this) or something..
<div class="item">
<span>Testing</span>
</div>
$('.item').live('click', function(e) {
$(e.target).hide();
});
Instead of hiding the target of the event, which could be anything inside the div, hide
thisdiv: