1

我将能够找到元素的第一个隐藏父项以使其可见。

尝试这个 whitout 成功:

$('input[name="toto"]').parents(":hidden:first").show();

关于这个的想法?

4

1 回答 1

1

为什么不只是隐藏.show() 所有祖先元素:

$('input[name="toto"]').parents(":hidden").show();

事实上,为什么要浪费时间过滤掉所有:hidden祖先show()

$('input[name="toto"]').parents().show();
于 2014-11-12T11:39:07.283 回答