Bug Tracker

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#319 closed feature (fixed)

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?

Change History (5)

comment:1 Changed 14 years ago by john

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.

comment:2 Changed 14 years ago by john

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

comment:3 Changed 14 years ago by john

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

comment:4 Changed 14 years ago by john

Milestone: 1.1
Priority: minormajor
Version: 1.1

comment:5 Changed 13 years ago by john

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.