When I pass a value by ID in JavaScript to hide the li element, only the first li is hidden and the second one remains visible. How can I hide all relevant elements?
$(function() {
$("#0").hide();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<li id="0" class="treeview">
<a href="#">
<i class="fa fa-files-o"></i>
<span>Header Options<i class="fa fa-angle-left pull-right"></i></span>
</a>
<ul class="treeview-menu">
<li><a href="addlogo.php"><i class="fa fa-circle-o"></i>Add logo</a></li>
<li><a href="addmenu.php"><i class="fa fa-circle-o"></i>Add Main Menu</a></li>
<li><a href="addslider.php"><i class="fa fa-circle-o"></i>Add slider img</a></li>
</ul>
</li>
<li id="0" class="treeview">
<a href="#">
<i class="fa fa-files-o"></i>
<span>Home Content<i class="fa fa-angle-left pull-right"></i></span>
</a>
<ul class="treeview-menu">
<li><a href="home_content.php"><i class="fa fa-circle-o"></i>Add Content</a></li>
</ul>
</li>