Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#2024 closed bug (fixed)

Selecting all sliders with ':slider' doesn't work

Reported by: mistermuckle Owned by:
Priority: minor Milestone: 1.5
Component: ui.core Version: 1.2.1
Keywords: slider Cc:
Blocked by: Blocking:


Lines 55-56 of ui.slider.js say:

//Make nodes selectable by expression
$.extend($.expr[':'], { slider: "(' '+a.className+' ').indexOf(' ui-slider ')" });

indexOf() returns -1 on failure, which evaluates to true, and the result is that $(':slider') selects every element on the page. Adding >=0 fixes the problem:

//Make nodes selectable by expression
$.extend($.expr[':'], { slider: "(' '+a.className+' ').indexOf(' ui-slider ')>=0" });

Change History (3)

comment:1 Changed 15 years ago by rdworth

Resolution: fixed
Status: newclosed

Fixed in [4086].

comment:2 Changed 14 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

comment:3 Changed 13 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.