我的脚本有点困在这里:
它的一个复选框过滤所有.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
- }