jquery select siblings 'until'

前端 未结 4 2062
温柔的废话
温柔的废话 2020-12-06 11:25

I have a DOM in the form of

&l
4条回答
  •  鱼传尺愫
    2020-12-06 11:28

    jQuery 1.4 now has the .nextUntil(selector) function:

        $('div.parent').toggle(
            function() {
                $(this).nextUntil('div.parent').hide();
             },
            function() {
                $(this).nextUntil('div.parent').show();
            }
        );
    

提交回复
热议问题