HTML
<div class='item_container'>
[...bunch of links and pictures...]
<a class='item_owner'>John Doe</a>
</div>
Javascript
$('.item_container').live('mouseenter', function(e){
$this = $(this);
if (!$this.data('isSetup')) {
$this.click(function(e){
return false;
});
[... a lot of other stuff]
$this.data({'isSetup': true});
}
});
Of course, when I click anywhere in the div, it does "do magic". Thanks return false, if I click on any link in a div, it still does "do magic" and does not change the page, which is the expected behavior.
But there is one link that should actually change the page, the link of the owner. The problem is that with my current setup, I prevented her from working.
source
share