Ahhh, gotcha; thanks for the explanation.

Jeremy

On Nov 25, 4:01 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> > I was not aware that returning false (or anything else for that
> > matter) from an event handling callback would do anything, but it
> > sounds like doing so invokes both event.preventDefault() and
> > event.stopPropagation() ... is that correct?  If so, then a stop()
> > method certainly does seem unnecessary.
>
> Yes, it calls both methods.
>
> > One other question: don't all JS functions return false by default (or
> > rather, return nothing, which then gets coerced to false)?  If so,
> > wouldn't that make it so that every event handler you hook up
> > automatically stops/prevents, unless you tell it to return something?
>
> It only gets coerced if we want it to (the normal return value is
> undefined). We explicitly check for a false value ( === false) in
> jQuery.
>
> --John
--~--~---------~--~----~------------~-------~--~----~
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