Instance Settings

Customise each targetted set of jQuery UI Sliders with the settings below (all are optional):

$(selector).slider().linkedSlider({policy: 'first'});

Note that the sliders to be linked must be initialised as sliders first and must be selected as the group.

NameTypeDefaultComments
totalnumber100 The grand total for all the linked sliders.
policystring'next' The policy followed to determine the order in which other sliders in the group are adjusted to restore the desired grand total. Use one of:

  • next - the next slider in normal document order, cycling back to the start of the group when necessary
  • prev - the previous slider in normal document order, cycling back to the end of the group when necessary
  • first - always start with the first slider in the group and proceed forward through the group
  • last - always start with the last slider in the group and proceed backward through the group
  • all - distribute changes equally amongst the other sliders in the group
Functions
SignatureReturnsComments
$.linkedSliders.setDefaults(settings)LinkedSliders object Update the default instance settings to use with all linked sliders instances.

settings (object) is the collection of new settings to apply.
$(selector).linkedSliders('option', options)jQuery object Update the settings for the linked instance(s) attached to the given sliders.

options (object) the collection of new settings.

$(selector).linkedSliders('option',
	{total: 300, policy: 'first'});

Since 1.1.0 - previously you used the 'change' command.
$(selector).linkedSliders('option', name, value)jQuery object Update a particular setting for the linked instance(s) attached to the given sliders.

name (string) the name of the setting to change;
value (any) the new value of that setting.

$(selector).linkedSliders('option', 'total', 300);

Since 1.1.0 - previously you used the 'change' command.
$(selector).linkedSliders('option', name)object or any Retrieve one or all of the current settings for the first linked instance attached to the given sliders.

name (string, optional) the name of the setting to retrieve; omit for all settings.

var settings = $(selector).linkedSliders('option');
var total = $(selector).linkedSliders('option', 'total');

Since 1.1.0 - previously you used the 'settings' command.
$(selector).linkedSliders('destroy')jQuery object Remove the linked sliders functionality from the given sliders.