Prevent anchor links from loading using jQuery

1
2
$("a").on("click", function(e){
e.preventDefault();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Simple snippet that shows how to prevent anchor links from loading using jQuery.

#jQuery #anchor #links

#cesarnog

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.