Reputation: 1130
I want to select only last li in first ul with jquery (without class and id). Not li in inner ul. How?
<ul>
<li></li>
<li>
<ul>
<li></li>
<li></li>
</ul>
</li>
**<li></li>**
</ul>
Upvotes: 0
Views: 60
Reputation: 2648
Use below.Give your ul a id
$('#yourulid li:last-child').val();
Upvotes: 0