我需要找回第一个元素。
我用这个密码..。
$(element).find('.x').first();据我所知,那个密码..。
element检索与.x匹配的所有元素,有什么更好的方法吗?像$.findOne()之类的吗?
发布于 2011-08-24 16:55:21
您可以使用后代选择器组合$(element)和.find()调用;我不确定性能比较:
$("#element .x").first().hide();https://stackoverflow.com/questions/7179163
复制相似问题