Bug Tracker

Modify

Ticket #4871 (closed bug: worksforme)

Opened 4 years ago

Last modified 4 years ago

:last selector problem

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

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.

Change History

comment:1 Changed 4 years ago by OneManSaint

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

 http://jsbin.com/ugoze

comment:2 Changed 4 years ago by mikecapp

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

comment:3 Changed 4 years ago by davidserduke

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

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

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

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.