Archive for November, 2011

Ven Diagram

Saw one, thought I could do better:

Let me know if you think it can be improved.

Advertisements

Non-JQuery script class switcher

Been using the JQuery equivalent for some time. Just had the need to convert it, so thought I’d save it.

It switches a ‘no-script’ class to a ‘script’ class on the HTML element and can be run in the head of the document.

var docElement = document.documentElement;
docElement.className = docElement.className.replace( /\bno-script\b/ , 'script');