html hyperlink <a> with no refresh

Roobah picture Roobah · Apr 26, 2011 · Viewed 7.1k times · Source

the a tag is used in Jquery dropdown menus and generally in ajax . But the problem it refeshes the page . How can I force it not to refresh ?

Thanks,

Answer

Adam Pope picture Adam Pope · Apr 26, 2011

Use e.preventDefault() in the click handler and return false;.