Is there something like except in jQuery?

前端 未结 2 457
广开言路
广开言路 2021-01-29 09:47

How is this possible? Following construction does not work:

$(\'.multibutton\').click(function(event) {

    //.. some stuff before

    $(this).next(\'.menu\').         


        
2条回答
  •  一个人的身影
    2021-01-29 10:42

    $('.multibutton').click(function(event) {
    
        //.. some stuff before
    
        var elem = $(this).next('.menu').slideDown( "slow");
    
        // hide all other menus except this.next.menu
        $('.menu').not(elem).hide();
    
        //.. some stuff after
    });
    

提交回复
热议问题