Did you try this?

$('a.some_link').click(function(event)
   //custom code
   return false;
});


----- Original Message ----- From: "Eridius" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
Sent: Friday, February 01, 2008 1:17 PM
Subject: [jQuery] stopping a link to redirecting




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-tp15234346s27240p15234346.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.


Reply via email to