Bug Tracker


Ticket #6086 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

Multiple class names and the visible selector

Reported by: marcselman Owned by:
Priority: undecided Milestone: 1.4.2
Component: ajax Version: 1.4.1
Keywords: Cc:
Blocking: Blocked by:


When using the :visible selector on a selection of elements which have multiple classes they are not selected.

Example: <a class="one two">link</a> $('.one:visible').length == 0

Change History

comment:1 Changed 4 years ago by addyosmani

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to worksforme

Here is a test case I have reproduced based on your original submission:


As you can see, :visible is able to successfully select the set of elements with class 'one' that are visible. The length of this set only accounts for the three (in yellow) that are visible and ignores the other links of class 'one' that are not.

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.