Skip to main content

Bug Tracker

Side navigation

#319 closed feature (fixed)

Opened October 27, 2006 10:41PM UTC

Closed January 10, 2007 06:20PM UTC

Last modified June 19, 2007 06:51AM UTC

Multiple Expression in .siblings(), .filter(), .not()

Reported by: anonymous Owned by:
Priority: major Milestone: 1.1a
Component: core Version: 1.1a
Keywords: siblings expression Cc:
Blocked by: Blocking:
Description

Shouldn't $('label').siblings('input,textarea').addClass('blah'); work?

$('input,textarea').addClass('blah') works (but not at the scope of

items that are siblings to labels.

A work around as pointed out on the mailing list is to $('label').siblings().find('input,textarea').

$('label').siblings('input').addClass('blah').end().siblings

('textarea').addClass('blah').end(); also works for what I'm doing,

but it seemed to me the expression in siblings should work the same

way as an expression in $(). Am I wrong on that?

Attachments (0)
Change History (5)

Changed November 17, 2006 10:13PM UTC by john comment:1

type: bugfeature

Maybe this can be, internally, reduced to allowing jQuery.filter() take an array of expressions to filter against? That way just a str.split(',') can be passed in, where necessary.

Changed November 17, 2006 10:13PM UTC by john comment:2

summary: siblings() expression doesn't work the same way as $() expressionsMultiple Expression in .siblings() and .filter()

Changed December 23, 2006 05:55PM UTC by john comment:3

summary: Multiple Expression in .siblings() and .filter()Multiple Expression in .siblings(), .filter(), .not()

Changed January 05, 2007 06:07PM UTC by john comment:4

milestone: → 1.1
priority: minormajor
version: → 1.1

Changed January 10, 2007 06:20PM UTC by john comment:5

resolution: → fixed
status: newclosed