Bug Tracker

Modify

Ticket #3979 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

jQuery('.class') returns only one element

Reported by: enerta Owned by:
Priority: major Milestone: 1.3.2
Component: unfiled Version: 1.3.1
Keywords: select element by class, $('.class') Cc:
Blocking: Blocked by:

Description

v 1.3.1 seems to find the first element of a certain class only.

E.g. $('.edit').click(function(){alert('I am .edit. My title is ' + $(this).attr('title'))});

would work on the first of three images but not the rest of them in this case:

<ul> <li><img src="image.gif" title="1" class="edit" /></li> <li><img src="image.gif" title="2" class="edit" /></li> <li><img src="image.gif" title="3" class="edit" /></li> </ul>

Change History

comment:1 Changed 4 years ago by dz

comment:2 Changed 4 years ago by enerta

Must be not jQuery itself but rather plugins.

comment:3 Changed 4 years ago by enerta

The ticket should probably be closed as invalid. Thanks!

comment:4 Changed 4 years ago by dmethvin

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

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

View

Add a comment

Modify Ticket

Action
as closed
Author


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

 
Note: See TracTickets for help on using tickets.