/ Published in: JavaScript
Detects JavaScript and switches class.
From an example given by [Paul Irish]('http://paulirish.com/perf/')
From an example given by [Paul Irish]('http://paulirish.com/perf/')
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// HTML <html class="no-js">…<html> // JS (function(H,C){H[C]=H[C].replace(/\bno-js\b/, 'js')}) (document.documentElement, 'className')