Posted By

diogoweb on 05/03/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

maltem


adding a class to the body if JavaScript was available


 / Published in: jQuery
 

URL: http://oncemade.com/adding-hasjs-class-when-javascript-is-available/

Demo: http://examples.oncemade.com/hasjs.html

  1. jQuery(function($) {
  2. $('body').addClass('hasJS');
  3. });
  4.  
  5. css
  6.  
  7. .hasJS .module {
  8. display: none;
  9. }

Report this snippet  

You need to login to post a comment.