},
_create: function() {
- var i,
+ var i, handleCount,
o = this.options,
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
- handleCount = ( o.values && o.values.length ) || 1,
handles = [];
this._keySliding = false;
( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
}
+ handleCount = ( o.values && o.values.length ) || 1;
+
for ( i = existingHandles.length; i < handleCount; i++ ) {
handles.push( handle );
}