I have this list :
<ul class="topnav" id="topnav">
<li><a href="#"><span>community</span> </a>
<ul class="level1">
<li><a href="#"><span>Commun1</span> </a>
<ul class="level1">
</ul>
</li>
</ul>
</li>
<li><a href="#"><span>Events</span></a>
<ul class="level1">
<li><a href="#"><span>Event1</span> </a>
<ul class="level1">
<li><a href="#"><span>Event2</span></a>
<ul class="level1"></ul>
</li>
</ul>
</li>
</ul>
</li> the the first ul under community and the first ul under Events
</ul>
I need to access only the first ul with the class level1 Im using In each ul I need to access only
.topnav li > ul
{
//code here
}
I’ve updated my code still can’t access the only the fi
Use like this:
See the working demo : http://jsfiddle.net/bqBdn/4/
Note: Your HTML code is little bit buggy, So correct it as I did in this demo. Use proper tagging for
ul, liinside mainliThanks!