.live() doesn't return the event to the function in 1.3b1
Hi,
The tracker is down so I can't find if this was already reported.
I've been trying to port a site that currently uses jQuery 1.2.6 +
livequery to jQuery 1.3b1 using $('...').live(...) instead. The event
is firing itself pretty good, but i can't cancel the propagation or
the default behavior. I had something like this:
HTML:
<a href="http://site.com/anotherpage" class="myClass">
Script:
$('a.myClass').livequery('click', function(event){
// do things
return false; // don't navigate to the href address
});
With jQuery 1.3b1 nothing stops the event. Tried event.preventDefault
();event.stopPropagation(); only to find out that the event
parameter .live gives back is a selector string, and not the event
object, as seen in the example below:
$('a.myClass').live('click', function(event){
console.debug(event); // outputs "a.myCalss"
});
Is .live() working this way on purpose or could it be some bug?