Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@eriwen
Created August 27, 2011 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eriwen/1174990 to your computer and use it in GitHub Desktop.
Save eriwen/1174990 to your computer and use it in GitHub Desktop.
Useful functions for web debugging (via @LeaVerou)
function $(id) { return document.getElementById(id); }
function $t(tag, con) { return (con || document).getElementsByTagName(tag); }
function $$(expr, con) { return (con || document).querySelectorAll(expr); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment