Return false is the accepted method and best practice in jQuery.
-- Josh
- Original Message -
From: Michael Sharman [EMAIL PROTECTED]
To: jQuery (English) jquery-en@googlegroups.com
Sent: Sunday, April 06, 2008 3:26 PM
Subject: [jQuery] Is there an Event.stop for hrefs?
Hi guys,
Returning false is fine, but there's also event.preventDefault():
http://docs.jquery.com/Events_%28Guide%29#event.preventDefault.28__.29
$('a').click(function(e) { e.preventDefault(); });
--Erik
On 4/6/08, Michael Sharman [EMAIL PROTECTED] wrote:
Hi guys,
I am listening for an href click
2 matches
Mail list logo