Created
July 16, 2012 03:13
-
-
Save toshimaru/3120211 to your computer and use it in GitHub Desktop.
handle <a> click event with jQuery.
This file contains hidden or 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
// via: http://docs.jquery.com/How_jQuery_Works | |
$(document).ready(function(){ | |
$("a").click(function(event){ | |
alert("As you can see, the link no longer took you to jquery.com"); | |
event.preventDefault(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment