Created
February 6, 2012 15:32
-
-
Save laustdeleuran/1752684 to your computer and use it in GitHub Desktop.
jQuery Event Listener - Anonymous functions and contect
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
$(document).ready(function(){ | |
var $links = $('a'); | |
$links.click(function(e){ | |
e.preventDefault(); | |
var a = "Wow, you clicked a link!"; | |
alert(a); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment