Jquery addClass not applying - am I overlooking something - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:addClass

Description

Jquery addClass not applying - am I overlooking something

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
  <style id="compiled-css" type="text/css">

.fbOO{ width:257px !important; display:block !important; margin:0 auto !important; }


      </style> 
  <script type="text/javascript">
    $(window).on('load', function() {
$('#FBo').addClass('fbOO');
    });/*  w ww  .j a va2 s .com*/

      </script> 
 </head> 
 <body> 
  <div id="FBo">
    test 
  </div>  
 </body>
</html>

Related Tutorials