如何一次执行两个jquery事件

时间:2018-05-30 17:07:20

标签: javascript jquery

如何同时执行两个事件?我按照以下方式做。但它没有正常工作。如果我一次执行单一,两者都可以正常工作。

$(document).on('click', '#menu', function(){
    if($(this).is(':checked'))
          $(this).parent().find('ul').slideDown('slow');
    else
    // these two events
        $(this).parent().find('input[type="checkbox"]').prop('checked', false);
        $(this).parent().find('ul').hide('slow');
});

0 个答案:

没有答案