Skip to main content

Bug Tracker

Side navigation

#3979 closed bug (worksforme)

Opened January 23, 2009 09:31PM UTC

Closed January 25, 2009 06:06PM UTC

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:
Blocked by: Blocking:
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>

Attachments (0)
Change History (4)

Changed January 25, 2009 09:46AM UTC by dz comment:1

Changed January 25, 2009 05:31PM UTC by enerta comment:2

Must be not jQuery itself but rather plugins.

Changed January 25, 2009 05:32PM UTC by enerta comment:3

The ticket should probably be closed as invalid. Thanks!

Changed January 25, 2009 06:06PM UTC by dmethvin comment:4

resolution: → worksforme
status: newclosed