A new result set is generated when we select and filter the wrapper set using Destructive Method. Such as:
HTML
$lt; Div $gt; $lt; P $gt; Com.lowagie.text.paragraph $lt; / p $gt; $lt; P $gt; Com.lowagie.text.paragraph $lt; / p $gt; $lt; / div $gt;
For the DOM Tree above, of course
$(’ div ’). The find (” p ”)
To get the p elements that all div elements contain, but the selection result definitely does not contain the div element itself. If you call andSelf() chaining after find, you can include previous selection($(‘div’)) in the result set as well.
Usage, for example,
For the above HTML code, use
$(’ div ’). The find (” p ”). The CSS (’ border ’, ‘1 px solid # 993300’);
CSS effects can only be applied to p elements But by adding andSelf() after find(), CSS also works with all div elements