Computer Magic Logo
Prevent anchor links from loading

Friday, January 22, 2016

Published by Aristotelis Pitaridis

The code below makes all the links to do nothing. If we want to define a smaller set of links we can change the selector.

$("a").on("click", function(e){
  e.preventDefault();
});