jQuery andself() text() val() htm()

andSelf() 将以前匹配元素集合增长到当前匹配元素集合中,返回匹配元素集合。 好比:$("div").find("p").andSelf().addClass("border");就是将匹配div元素集合增长到匹配p元素集合中。html    $(this).find("p").addClass("p1").andSelf().addClass("p2");   //p   this 都引用
相关文章
相关标签/搜索