I am trying to attach a class to the first link in an unordered list, but I can't seem to get it to work. Can someone take a look at the code below and see if I have any errors?
The jQuery Call
From my custom scriptCode:<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js"></script>
The HTMLCode:// Begin Javascript $(document).ready(function(){ $("#menu ul li a:first").addClass("itemhover"); });
Code:<div id="menu"> <ul> <li class="first">Select User</li> <li><a href="#invite"><span>Bill</span></a></li> <li><a href="#invite"><span>George</span></a></li> <li><a href="#invite"><span>Tom</span></a></li> </ul> </div>


Reply With Quote

Bookmarks