// Sample code editor - with JavaScript syntax highlighting var $pre = $('pre code'); $('textarea').keyup(function () { var el = this; $pre.html(prettyPrintOne(el.value)); }).keyup();