我的意思是,有没有办法知道列是否被隐藏?我刚学会用
隐藏它们$('#tableG td:nth-child('+(index+1)+'), #tableG th:nth-child('+(index+1)+')').hide();
但现在我需要获得状态,是否有类似的内容:
if($('#tableG th:nth-child('+(index+1)+')').show() == true) { ... }
答案 0 :(得分:4)
您想使用这种表示法:
$(element).is(":visible")
这样:
if($('#tableG th:nth-child('+(index+1)+')').is(":visible")) {...}
答案 1 :(得分:0)