Created
January 25, 2013 19:34
-
-
Save wpscholar/4637149 to your computer and use it in GitHub Desktop.
Prevent all links with # as the href from doing anything
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prevent all links with # as the href from doing anything | |
*/ | |
jQuery(document).ready(function($) { | |
$('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