Demoing and displaying JavaScript at the same time using CSS
When writing documentation or doing examples you constantly run into the same issue: how do you display and demo the code at the same time? You don’t want to have a code display and live code as they will get out of sync (on the other hand I always found that when copying code into a document I also cleaned it up and optimised it).
The easiest way for this are all the “new” services like JSFiddle, JSBin, Dabblet, Tinker.io and others (there seems to be a new one every month now) and you can even embed them
What the influencers are saying
-
Patrick Mueller
haha - set CSS display:block for script elements - http://t.co/RTKb967e
-
Christian Heilmann
Demoing and displaying JavaScript code at the same time using CSS: http://t.co/F7o3WvkA (/ht @mathias)












