<div class="ex">
<button class="hide" type="button">Hide me</button>
</div>一个层中有一个按钮
请问:$(".ex .hide")
取得的是div和button两个对象
还是该div层下的button对象?
<button class="hide" type="button">Hide me</button>
</div>一个层中有一个按钮
请问:$(".ex .hide")
取得的是div和button两个对象
还是该div层下的button对象?
$(".ex .hide").click(function(){
$(this).parents(".ex")});
的意思是该button的所有父元素并且class="ex"的意思吗
parents是所有父元素的意思吗 返回的应该是一个集合吧