Posted By

dottDesign on 03/04/11


Tagged

textmate jQueryjavascripthtml


Versions (?)

Add class to HTML


 / Published in: Other
 

  1. <script type="text/javascript">
  2. // jQuery is passed to the ready function as a parameter, so we alias it with $
  3. // This will work for you even with wikispaces
  4. jQuery(function($){
  5. var loc = window.location.pathname.match(/^/?(w+)b/);
  6. if(loc) $(document.body).addClass(loc[1].toLowerCase());
  7. });
  8. </script>

Report this snippet  

You need to login to post a comment.