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 都引用
相關文章
相關標籤/搜索