PrismJS
prismjs.com
prismjs.com
I usually just export my code from Emacs via M-x htmlfontify-buffer which dumps a bunch of CSS and HTML. This also allows me to take advantage of my different Emacs themes. It also outputs CSS with good class names like "string" or "keyword". If you add your own custom faces, it just uses the name you gave them. This means the coloring is exactly as customizable as it is in Emacs. It is also very easy to theme with CSS to match your site if you don't like any of the Emacs color themes.
2) Do you really need jQuery there? You seem to be using it only for the html method, and including 93K extra JS instead of just using innerHTML seems a bit overkill.
It checks for the case that .innerHTML setting is not supported (I think that was for certain versions of IE) and switches to using appendChild(). I think that that small oversight is somewhat reasonable justification for using a wrapper that abstracts away the browser differences, although it can be argued that once someone understands the differences, they could just add the use cases to their code.
The bigger regExps you write, the slower and more bug-prone your code will be.
http://craig.is/making/rainbows (1.4kb) http://softwaremaniacs.org/soft/highlight/en/
I prefer
Pretty in Chrome Canary Version 22.0.1221.0 though.
The code snippets are overlayed with black 'blocks'.
But the site's index.html is using only a pre tag:
<p>The Prism source, highlighted with Prism (don’t you just love how meta this is?):</p>
<pre data-src="prism.js"></pre>
It looks like the script is automatically expanding this, inserting <code> tags along with the named file, but I don't see any documentation for doing it this way.Also, if anyone is as confused as I was about why there's a "data-src" attribute, apparently it's an HTML5 data attribute: http://ejohn.org/blog/html-5-data-attributes/
This is just a syntax highlighter for embedding code examples in your site/blog.