gpt4 book ai didi

jquery - 检查所有子元素是否都被隐藏

转载 作者:行者123 更新时间:2023-12-03 21:33:56 25 4
gpt4 key购买 nike

我的脚本有点卡在这里:

它是一个过滤所有 .notme 图像并隐藏其列表项的复选框。现在的问题是我无法为 fadeToggle 获取有效的回调函数。它的行为应该像这样:

If all children of #list-team-single-container are "displayed none" - do something.

$('#show-only-my-teams').change(function(){
$('.notme').each(function(){
$(this).parent().parent().fadeToggle('fast', function(){
});
});
});

最佳答案

if($('#list-team-single-container').children(':visible').length == 0) {
// action when all are hidden
}

关于jquery - 检查所有子元素是否都被隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10382353/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com