skip to Main Content

Jquery nextUntil() won't match my elements

document.addEventListener('DOMContentLoaded', function() { collapsed = $(document).find('.off'); collapsed.closest('table').nextUntil('.head', 'tr').not('head').hide(); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <table> <tr class="head on"> <td><a class="ln-head" href="#">Header On</a></td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> <tr class="head off"> <td><a…

VIEW QUESTION
Back To Top
Search