jquery closest方法
2020-12-13 01:55
标签:des style class code color get
Description: For
each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. 使用说明: 对于集合(set)中的每一个元素, 通过在文档树中向上遍历这个元素本身和它的祖先元素,来取得第一个与选择符(selector)匹配的那个元素. 举例:
结果为:
jquery closest方法,搜素材,soscw.com jquery closest方法 标签:des style class code color get 原文地址:http://blog.csdn.net/u012307002/article/details/25193719
.closest( selector )
this is [Span] party.
$("#third").closest("div")