Skip to main content

Bug Tracker

Side navigation

#4871 closed bug (worksforme)

Opened July 09, 2009 08:42AM UTC

Closed November 06, 2009 04:52AM UTC

:last selector problem

Reported by: OneManSaint Owned by: john
Priority: minor Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: last selector Cc:
Blocked by: Blocking:
Description

I have a couple of sets of nested lists, when using the :last selector to find the last li's in the nested ul's i only seem to be able to grab the very last one.

An example of the problem is available here

http://jsbin.com/onaye

I'm sure both "third pages" should have a red border.

Attachments (0)
Change History (3)

Changed July 09, 2009 09:08AM UTC by OneManSaint comment:1

Updated with a work around that works as i would expect here

http://jsbin.com/ugoze

Changed September 29, 2009 12:26PM UTC by mikecapp comment:2

The result in your example looks right to me. Did you want ":last-child" rather than ":last"?

Changed November 06, 2009 04:52AM UTC by davidserduke comment:3

resolution: → worksforme
status: newclosed

I agree with mikecapp that you seem to want :last-child. Find the docs here:

http://docs.jquery.com/Selectors/lastChild