views:

496

answers:

6

Is there a jquery shell/parser emulation online where i can input simple jquery commands on a pasted HTML snippet and see it's effects or capture it's outputs. It would be of real help in understanding basic jquery functions rather than opening up a new html file up and writing code from scratch.

cheers

+7  A: 

You can do this with the console in firebug for firefox. I do it frequently. Just go to any page that has the jQuery library referenced, and write your heart out!

The great thing about this is that you're not limited to a single sample-page. Every jQuery-enabled website online becomes your playground when you've got firebug's console.

And before FireBug gives you the ability to modify the souce of a page, you can paste in any additional HTML you wish onto any page, and then write more jQuery against your newly-pasted HTML.

Apparently there's an extension called FireQuery for firebug to facilitate this very thing.

Jonathan Sampson
Haha... very true, I often go to the jQuery website to quickly test stuff out. I also installed FireQuery for FireBug so I can add jQuery to any web page out there for testing.
Doug Neiner
you can even go to the address bar of any browser and type `javascript:$("something").hide()`
Rob Fonseca-Ensor
But you are missing the ability to run the commands on a "pasted html snippet" as the OP requested. -- well, I guess you could use Firebug's edit HTML feature. Hmmm... my mind thinking now :)
Doug Neiner
Doug, not really. You can edit HTML with FireBug, and paste in any HTML.
Jonathan Sampson
+10  A: 

Yes, use JSBin, just be sure to choose "jQuery" from the include menu before beginning.

Doug Neiner
Awesome stuff!! Didn't knew this existed.
Ritesh M Nayak
+1  A: 

You might also want to try Jquerify, which provides a handle onto firebug for Jquery. You can do some pretty nifty things with it.

Ritesh M Nayak
You should update the link: http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet
Casebash
A: 

If you don't have firebug or if you're not using firefox you can try out firebug lite:

http://getfirebug.com/lite.html

Especially useful is the bookmarklet. Scroll down to the "Firebug lite as bookmarklet" section and save that link as a bookmark. Now open the page you want to try jQuery on and load the bookmarklet.

If the page doesn't have jQuery already loaded you can type the following in the firebug console:

var s = document.createElement('script');
s.src = 'http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js';
document.body.appendChild(s);
slebetman
A: 

JQuery sandbox

Kniganapolke
Link is dead on 30 July 2010.
jsumners
A: 

jqueryconsole.com is my fav

brian