Skip to content

Instantly share code, notes, and snippets.

@MikeGrace
Created June 21, 2010 22:34
Show Gist options
  • Save MikeGrace/447625 to your computer and use it in GitHub Desktop.
Save MikeGrace/447625 to your computer and use it in GitHub Desktop.
Testing jQuery's each function in firebug console
test = [1,2,3,4,5];
$K(test).each(function() {
console.log(this + 1);
})
@MikeGrace
Copy link
Author

I just love how easy it is to write stuff up in the Firebug console to test stuff!
Wasn't sure about jQuery's .each function so I wrote a simple test in the console to test it on http://example.com/ where I had already run a kynetx app so I had access to the $K jQuery handle.

This screenshot shows off my process and the code that goes with each step. https://mikegrace.s3.amazonaws.com/github/firebug-console/firebug-console-testing-jquery-each.png

Code is simple but the concept is powerful ; )

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