trying to target children inside children
heres my jquery code:
var paragraphs = $("#paragraphs");
paragraphs.hide();
$("#clickThis").click(function() {
paragraphs.find("li.one").show();
});
heres my html code:
<h1 id = "clickThis">Click</h1>
<div id ="paragraphs">
<ul>
<li class="one">1</li>
<li class="two">2</li>
<li class="three">3</li>
</ul>
</div>
I'm trying to make it so that when you click on the heading it brings up only the list with the class one, but its not working and I can't seem to figure out whats wrong with my code or if im doing something wrong, as I believe this is correct.