trovster.com

The personal website of Trevor Morris

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

About

My name is Trevor Morris & I am a movie-loving, mountain bike-riding web developer from the UK. Currently, freelancing at Surface.

Latest tweet

@Andy383 gonna need to pick your brains regarding iPad app development. Need to build something. Are you at @multipack on Saturday?

Subscribe

You can keep up to date with my blog or movie ratings by following the feeds: