Yeah, I agree that this is not ideal - thanks for spotting it, I'll
look in to it.

--John



On Mon, Dec 22, 2008 at 4:48 PM, Kurt Mackey <[email protected]> wrote:
>
> The event delegation stuff in jQuery seems extra tasty, particularly when you 
> have to deal with ghetto ad code written in the previous century.
>
> However, there's one bit of behavior that doesn't act how I'd expect it to.  
> If you bind a function to click events and return false, it doesn't cancel 
> the event.
>
> Example:
>
> <script type="text/javascript">
>  $('a.booya').live('click', function(){
>    alert('Clicked!');
>    return false;
>  });
> </script>
> <body>
>  <a href="http://xkcd.com"; class="booya">Clicky clicky.</a>
> </body>
>
> If you click the link, you get the nice popup and the browser happily carries 
> you on to the location specified by the href.
>
> Thinking about this, it makes a little bit of sense since the event isn't 
> really bound to the <a> element.  However, I would really like some way to 
> say "ok, you're done now, don't do anything else" within a delegated event 
> like this.
>
> -Kurt
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to