Skip to main content

Bug Tracker

Side navigation

#8236 closed bug (duplicate)

Opened February 10, 2011 01:36PM UTC

Closed February 10, 2011 04:38PM UTC

Last modified February 10, 2011 04:38PM UTC

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

Reported by: SLaks Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
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/

Attachments (0)
Change History (2)

Changed February 10, 2011 04:38PM UTC by jitter comment:1

component: unfiledselector
priority: undecidedhigh
resolution: → duplicate
status: newclosed

Changed February 10, 2011 04:38PM UTC by jitter comment:2

Duplicate of #5414.