It sounds like John is saying that
e.preventDefault() will prevent the default event from occuring and
e.stopPropogation() will prevent the event from bubbling up and
return false will do both, so
If you only want to stop the default but allow propogation or vice
versa, then use the methods, oth
Thanks, John.
So is it advisable to use one form or another?
I've used return false throughout my app, and I'm trying to decide if
it's a best practice to change it to preventDefault() if it's wiser to
do so.
On Apr 20, 2:26 pm, John Resig wrote:
> return false does e.preventDefault() and e.st
return false does e.preventDefault() and e.stopPropagation().
--John
On Mon, Apr 20, 2009 at 3:20 PM, kgosser wrote:
>
> Just curious if there is a best practice when choosing between
>
> $("a").click(function(){
> // stuff
> return false;
> });
>
> and
>
> $("a").click(function(){
> //
3 matches
Mail list logo