Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#4538 closed bug (invalid)

pushStack generates wrong selector properties, if you use multiple selectors

Reported by: trixi Owned by:
Priority: minor Milestone:
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

If you use a multiple Selector like $('.context-1, .context-2').find('a'). The pushStack method creates the following selector-property: '.context-1, .context-2 a'. I have added a patch, wich adds support for the traversing methods: find, children, next and siblings.

Attachments (1)

pushstack-selector.patch (2.3 KB) - added by trixi 14 years ago.

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by trixi

Attachment: pushstack-selector.patch added

comment:3 Changed 12 years ago by dmethvin

Keywords: needsreview added
Milestone: 1.4
Resolution: invalid
Status: newclosed

The .selector property isn't publicly documented. It's used for .live but that is not supported in combination with filtering methods such as .find(). It is not our intention to provide a documented and always-accurate .selector property. Do not use the .selector property for any external needs. It may be changed in the future. The first rule of the .selector property is that you don't talk about the selector property.

comment:4 Changed 12 years ago by dmethvin

Keywords: needsreview removed

comment:5 in reply to:  3 Changed 12 years ago by jitter

Replying to dmethvin:

The .selector property isn't publicly documented.

Ummm... the property is documented publicly http://api.jquery.com/selector/ but it also has a warning

[...] if DOM traversal methods have been called on the object, the string may not be a valid jQuery selector expression.

Note: See TracTickets for help on using tickets.