Last active
August 29, 2015 14:04
-
-
Save fitnr/caf67f9df4b5a30f0d65 to your computer and use it in GitHub Desktop.
Tired of that extra '#' you need to specify an element's id in jQuery, compared to document.getElementById? Just add this to your code and use $.getElementById('foo')! Easy as pie!
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
// this is satire, do not use in real life | |
jQuery.getElementById = function(id) { | |
return jQuery('#' + id); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment