Modify ↓
Ticket #6086 (closed bug: worksforme)
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: |
Description
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Here is a test case I have reproduced based on your original submission:
http://jsfiddle.net/tpufR/2/
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.