Bug Tracker

Modify

Ticket #8236 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

live doesn't work with :not(:last)

Reported by: SLaks Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.5
Keywords: Cc:
Blocking: Blocked by:

Description

Writing $('div button:not(:last)').live(...) will catch events on all matching elements, even the (excluded) last one, and all of their parent elements.

Removing the div from the selector will cause live to not handle anything at all.

Changing live to bind will cause it to handle the correct elements, with or without div.

Using :not(.Class) or :last alone will work correctly even with live.

Tested on 1.5 and 1.4.4

 http://jsfiddle.net/SLaks/aPnYv/

Change History

comment:1 Changed 2 years ago by jitter

  • Priority changed from undecided to high
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to selector

comment:2 Changed 2 years ago by jitter

Duplicate of #5414.

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.