Skip to content

Instantly share code, notes, and snippets.

@idac73
Created January 23, 2013 15:43
Show Gist options
  • Save idac73/4608336 to your computer and use it in GitHub Desktop.
Save idac73/4608336 to your computer and use it in GitHub Desktop.
jQuery disable redirect on all anchor tags with only a hash # in the href attribute
$("a[href='#']").click(function(e) {
e.preventDefault();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment