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 <jere...@gmail.com> wrote:
> return false does e.preventDefault() and e.stopPropagation().
>
> --John
>
> On Mon, Apr 20, 2009 at 3:20 PM, kgosser <kgos...@gmail.com> wrote:
>
> > Just curious if there is a best practice when choosing between
>
> > $("a").click(function(){
> >   // stuff
> >   return false;
> > });
>
> > and
>
> > $("a").click(function(){
> >   // stuff
> >   event.preventDefault();
> > });
>
> > to cancel out the href of an anchor when clicked.
>
> > Thanks in advance for the help.

Reply via email to