如何使用JQuery获取列的状态?
我是说,有没有办法知道一列是否被隐藏了?我刚学会用手把它们藏起来如何使用JQuery获取列的状态?,jquery,Jquery,我是说,有没有办法知道一列是否被隐藏了?我刚学会用手把它们藏起来 $('#tableG td:nth-child('+(index+1)+'), #tableG th:nth-child('+(index+1)+')').hide(); 但现在我需要获得状态,是否有类似于: if($('#tableG th:nth-child('+(index+1)+')').show() == true) { ... } 您希望使用这种表示法: $(element).is(":visible") 因此:
$('#tableG td:nth-child('+(index+1)+'), #tableG th:nth-child('+(index+1)+')').hide();
但现在我需要获得状态,是否有类似于:
if($('#tableG th:nth-child('+(index+1)+')').show() == true) { ... }
您希望使用这种表示法:
$(element).is(":visible")
因此:
您希望使用这种表示法:
$(element).is(":visible")
因此:
你有你有