Bug Tracker


Ticket #3419 (closed bug: wontfix)

Opened 6 years ago

Last modified 6 years ago

css selection bug: $("*").filter("body, body *") selects html and head

Reported by: pepijn Owned by:
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: Cc:
Blocking: Blocked by:


this is my first bug report, so pleas be kind and explain if i did something wrong.

$("*").filter("body, body *").css({display: "block", border: "1px solid red"}); even makes the head visible in safari.

i was writing a plugin that would break if * is supplied as argument, so i want to filter out the head(and everything in it) and html tags.

$("*").not("html, head, head *").css({display: "block", border: "1px solid red"}); stopped it from making the header visible and giving it red borders, but title and 2 script tags seem to be included still. placing $("head").css("display", "block"); after it revealed that indeed the title and script tags had red borders.

however, if i just type the following in the head, nothing happens to it. <style> body, body * {

border:1px solid blue; display:block;

} </style>

Change History

comment:1 Changed 6 years ago by flesler

  • Status changed from new to closed
  • Resolution set to wontfix

filter() only supports simple selectors for now, that is, descendance selectors, etc cannot be used with filter() for now.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.