Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add Class to Object on Page Load
- <li id="about"><a href="#">About</a>
- <li id="about" class="expand"><a href="#">About</a>
- window.onload = function() {
- document.getElementById('about').className = 'expand';
- };
- $(function() {
- $('#about').addClass('expand');
- });
- $(document).ready(function(){
Advertisement
Add Comment
Please, Sign In to add comment