Skip to content

Instantly share code, notes, and snippets.

@fitnr
Last active August 29, 2015 14:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitnr/caf67f9df4b5a30f0d65 to your computer and use it in GitHub Desktop.
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 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