PDA

View Full Version : Tip: post your example code to jsfiddle.net



eterps
5 Jul 2010, 8:35 AM
I see that most people are pasting their example code within their forum message when they are asking for help.
Maybe it is a good idea to use jsfiddle.net instead?
With jsfiddle.net you can run and edit the example code in the browser, see for example:

http://jsfiddle.net/nJpYz/1/

When you have found a solution to someone's problem you can reply with the jsfiddle URL of your solution so that people can play with it and try to improve it.
Please let me know what you think.

--Erik

P.S.: In the 'Manage resources' box on the left of the screen I have added these URLs to be able to run a Sencha Touch app:

http://www.sencha.com/deploy/touch/resources/css/ext-touch.css
http://www.sencha.com/deploy/touch/ext-touch-debug.js

TommyMaintz
6 Jul 2010, 1:00 PM
Nice, thanks for the tip. People are free to use whatever code pasting service they want. It would definitely help us answer questions faster.

eterps
7 Jul 2010, 2:12 AM
Hmmm, unfortunately the jsfiddle result do not work directly within Safari on my iPad, I am not sure why though.
It looks like touch events are not detected in the Result layer.

eterps
7 Jul 2010, 7:05 AM
Ok I can now also test the jsfiddle result in my iPad/iPhone/Android device.
When you append '/show/light/' to a jsfiddle URL you have the URL to the complete working app:

So when you want to test the result of:

http://jsfiddle.net/nJpYz/1/

you need to point the browser on your device to:

http://jsfiddle.net/nJpYz/1/show/light/