I never heard of event.preventDefault()  but just return false;

$('a.some_link').click(function(event)
{
.
.
return false;
});

On Feb 1, 10:17 pm, Eridius <[EMAIL PROTECTED]> wrote:
> I thought this would stop the link from redirecting:
>
> $('a.some_link').click(function(event)
> {
>     event.preventDefault();
>     //custom code
>
> });
>
> however this does not work.  is thier a way is jQuery (or plain javascript)
> to not have the link redirect on an onclick event?
> --
> View this message in 
> context:http://www.nabble.com/stopping-a-link-to-redirecting-tp15234346s27240...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to