I am trying to select an item from a nested list with jquery but I cannot do it so far
This is what I’ve tried so far
Jquery:
$(document).ready(function() {
var $target= ("div>ul>li>ol>li:nth-child(4)");
$target.fadeOut('fast');
});
And this is my html code:
<div>
<ul>
<li>
<ol>
<li>something</li>
<li>something</li>
<li>something</li>
<li>something</li> <--- This is what I am trying to access
</ol>
</li>
<li>something else</li>
<li>something else</li>
</ul>
</div>
try this
You forgot the $
http://jsbin.com/asazey/1/edit