Tuesday, July 19, 2011

JSFiddle : Javascript example website

JSFiddle lets you create editable javascript examples similar to those found on my previous post.  You can create an account and start building examples that other people can play with.  I'm looking forward to trying it out, but for now, I'll show what their examples look like when embedded in a page.

The example window needs to be 500px wide, or it won't work. I had to mess with my blog settings and make the main window wider to get it to work.

It looks like you can't edit the code and experiment with it when the code is embedded in another page. You have to go to the main site here to do that. So it's not as great as I thought it would be. Still useful for complicated examples though.

The following is one of their default examples that uses jquery to display a message and do an animated fade after a second.  Click the "run" arrow, or the "result" tab to see what the code does.






2 comments:

zalun said...

Please also check the http://doc.jsfiddle.net/ there is a ton of stuff you can do with jsfiddle.

dave said...

OOh, thanks. It lets me select which buttons to show by attaching /result,js,html/ to the end of my embed request. Then I can show the result first, and hide the css tab that doesn't contain anything