Bug Tracker

Ticket #6086 (closed bug: worksforme)

Opened 5 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:

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

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:

 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.

Note: See TracTickets for help on using tickets.