Guest User

Untitled

a guest
Jul 1st, 2012
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Add Class to Object on Page Load
  2. <li id="about"><a href="#">About</a>
  3.  
  4. <li id="about" class="expand"><a href="#">About</a>
  5.  
  6. window.onload = function() {
  7. document.getElementById('about').className = 'expand';
  8. };
  9.  
  10. $(function() {
  11. $('#about').addClass('expand');
  12. });
  13.  
  14. $(document).ready(function(){
Advertisement
Add Comment
Please, Sign In to add comment