<div class="nav-top"> <ul> <li class="tab1"><a href="/">test</a></li> <li class="tab2"><a href="#">test</a></li> <li class="tab3"><a href="#">test</a></li> <li class="navahead"><a href="#">test</a></li> <li class="navahead"><a href="#">test</a></li> <li class="new"><a href="#">test</a></li> </ul> </div> i want to only add onmouse over event to the first three li(tab1,tab2,tab3). how to write the if condition.