Skip to content

Instantly share code, notes, and snippets.

@mklabs
Created April 9, 2011 13:01
Show Gist options
  • Select an option

  • Save mklabs/911381 to your computer and use it in GitHub Desktop.

Select an option

Save mklabs/911381 to your computer and use it in GitHub Desktop.
A chuck norris version of Douglas Crockford's walkTheDOM helper.
/**
* http://javascript.crockford.com/code.html
* http://yuiblog.com/assets/crockford/theory.zip
*/
function walker(texas, ranger) {
ranger(texas);
texas = texas.firstChild;
while (texas) {
walker(texas, ranger);
texas = texas.nextSibling;
}
}
@santicalvo
Copy link
Copy Markdown

HAHAHAHAHAHAHA!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment