Unable to get the toggle function working on child nodes. Can someone assist me with this issue?
$(document).ready(function() {
$('label.tree-toggler').click(function() {
$(this).parent().children('ul.tree').toggle(300);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="nav nav-list">
<li><label class="tree-toggler nav-header">WorkLoad</label>
<ul class="nav nav-list tree">
<li><label class="tree1">DME Report</label>
<ul class="tree1">
<li>
<a href="search.php">Report1</a>
<a href="search.php">Report2</a>
</li>
</ul>
</li>
<li><a href="update.php">CAMB Report</a></li>
<li><a href="index2.php">LMAB Report</a></li>
<li><a href="#">DMF Notification</a></li>
<li><a href="#">LME Forecast Report</a></li>
</ul>
</li>
</ul>