Created
May 15, 2014 11:00
-
-
Save carlosrojaso/3cb47850f0e0d60e7536 to your computer and use it in GitHub Desktop.
jQuery Event Basics
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
// Event setup using a convenience method | |
$( "p" ).click(function() { | |
console.log( "You clicked a paragraph!" ); | |
}); | |
// Equivalent event setup using the `.on()` method | |
$( "p" ).on( "click", function() { | |
console.log( "click" ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment