Ticket #10696 (closed enhancement: invalid)
Proposed enhancement of :not selector
|Reported by:||sneethling@…||Owned by:|
If I have HTML such as:
<summary>Some text content</summary> <p>Some text content</p> <p>Some text content</p>
And I use the :not selector as follows:
I get the expected result where the result contains the two paragraphs. If however I change the summary line as follows:
<summary>Some <abbr title="some explaination">text</abbr> content</summary>
The result now includes the two paragraphs but also the abbr. The expected result would be that just the two paragraphs should be in the result.
Reading the API: "The supplied selector is tested against each element; the elements that don't match the selector will be included in the result." - This explains why the above is happening.
However, if the content you wish to exclude is dynamically generated, you will not always know what other tags might be added inside the summary element for example therefore, making something like:
$(".details :not(.summary, abbr)");
not really an option. I therefore propose that the .not() and/or :not() functions have a boolean that maps to includeChildElements. If this is true, then exclude the selector and all of it's contained child elements.
More can be seen here: http://jsfiddle.net/MHQyg/2/