本文介绍了jQuery手风琴if else条件与nextUntil()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 您可以在此处查看我的完整代码小提琴 You can view my complete code here fiddle$(".jx_form_Annuairecommunal:has(.level0 .level3)").click(function () { $(this).nextUntil('.jx_form_Annuairecommunal:has(.level0 .level3)').find('.level0 .level4').slideToggle(300); $(this).nextUntil('.jx_form_Annuairecommunal:has(.level0 .level4)').find('#left1, #left2, #left3, #right1, #right2,#right3').slideToggle(300); return false; }); 我的问题是每当我点击.level0 .level3或.level0 .level4或.level0 .level5标题时,我就是无法仅显示属于此级别的人员的姓名。如果我的.level0 .level3下面有.level0 .level4,那么该人的名字应该在它到达.level0 .level4时停止,否则它应该在它到达另一个时停止.level0 .level3 希望有人可以提前帮助我解决这个问题My problem is that whenever I clicked on a .level0 .level3 or a .level0 .level4 or a .level0 .level5 header I am not able to show the name of only the people belonging to this level. If ever I have .level0 .level3 with .level0 .level4 below it the name of the person should stop as it reaches this .level0 .level4 or else it should stop whenever it reaches another .level0 .level3Hope that someone can help me out with this one and thx in advance推荐答案 我的问题是每当我点击.level0 .level3或.level0 .level4或.level0 .level5标题时,我就是无法仅显示属于此级别的人员的姓名。如果我的.level0 .level3下面有.level0 .level4,那么该人的名字应该在它到达.level0 .level4时停止,否则它应该在它到达另一个时停止.level0 .level3 希望有人可以提前帮助我解决这个问题My problem is that whenever I clicked on a .level0 .level3 or a .level0 .level4 or a .level0 .level5 header I am not able to show the name of only the people belonging to this level. If ever I have .level0 .level3 with .level0 .level4 below it the name of the person should stop as it reaches this .level0 .level4 or else it should stop whenever it reaches another .level0 .level3Hope that someone can help me out with this one and thx in advance 这篇关于jQuery手风琴if else条件与nextUntil()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-25 00:46