How can I check if body has specific class? This is my case:
jQuery.hasClass works for me...
non jQuery answer, try if( document.body.className.match('foo') ) { ... }
if( document.body.className.match('foo') ) { ... }