Created
June 21, 2010 22:34
-
-
Save MikeGrace/447625 to your computer and use it in GitHub Desktop.
Testing jQuery's each function in firebug console
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
test = [1,2,3,4,5]; | |
$K(test).each(function() { | |
console.log(this + 1); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ; )