Run Code — Download
A simple plugin which converts your code examples to live behaviour.
This plugin is incredibly simple — it takes a block of code and evaluates it. That’s it! But, it has a cool application when you’re showing casing code and plugins. Instead of duplicating code in the header and then when you give examples to the user, you simply just run the example code.
This page isn't probably the best showcase of such a plugin, but you can see it in action if you view one of
my jQuery plugins. The examples are run through the plugin, which in turn
makes each <code> block within the example in to its working code.
Below is the code used to run the examples:
$('code.javascript').runcode();