Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html hyperlink <a> with no refresh

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,

like image 516
Roobah Avatar asked Dec 08 '25 10:12

Roobah


1 Answers

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

like image 65
Adam Pope Avatar answered Dec 10 '25 04:12

Adam Pope



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!