开发者

Online jquery shell/parser

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 o开发者_运维知识库r 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


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


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.


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


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);


jqueryconsole.com is my fav

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜