是否有类似jQuery的东西? [英] Is there something like except in jQuery?
本文介绍了是否有类似jQuery的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这怎么可能?以下构造无法正常工作:
How is this possible? Following construction does not work:
$('.multibutton').click(function(event) {
//.. some stuff before
$(this).next('.menu').slideDown( "slow");
// hide all other menus except this.next.menu
$('.menu :not(this.next)').hide();
//.. some stuff after
});
谢谢
推荐答案
$('.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
});
这篇关于是否有类似jQuery的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文