If you use google-code-prettify , you can do this (I am doing it now):
$(document).ready(function() { $('pre').addClass('prettyprint'); prettyPrint(); });
Basically, you upload all the files:
prettify.css sunburst.css
Add the code snippet above and call prettyPrint : onload="prettyPrint()" .
The code snippet above should go before all the files. It finds all the pre elements and adds the prettyPrint class to it so that the script knows how to style it.
If, however, you wanted to use the current syntax syntax, you could do something like this (using jQuery):
$(document).ready(function() { $('pre').addClass('test'); $('code').addClass('html');
source share