skip to Main Content

JQuery .fadeToggle() not working properly: Automatically fades out

$(document).on('click', '.tree label', function(e) { $(this).next('ul').fadeToggle(); e.stopPropagation(); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <ul class="tree"> <li class="has"> <label class="container">ROOT<span class="total">(12) </span> <input type="checkbox" name="domain[]" value="ROOT"> <span class="checkmark"></span></label></ul> <ul style="display: none;"> <li><label class="container">CHILD<input type="checkbox" name="subject[]" value="CHILD"><span class="checkmark"></span></label></li> </ul></li> </ul> When I click the first…

VIEW QUESTION
Back To Top
Search