A jQuery plugin that links several jQuery UI Sliders so that they always total to a given value. If you find this plugin useful please vote for it on the jQuery site.
This page provides a documentation reference for working with the plugin v1.0.0. See a demonstration of the bookmark plugin and download the code from there. Or see a minimal page that you could use as a basis for your own investigations.
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.
| Signature | Returns | Comments |
|---|---|---|
| $.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('change', settings) | jQuery object | Update the settings
for the linked instances attached to the given sliders.settings (object) is the collection of new settings to apply. |
| $(selector).linkedSliders('change', name, value) | jQuery object | Update a single setting
for the linked instances attached to the given sliders.name (string) is the name of the setting;value (any) is the setting value. |
| $(selector).linkedSliders('destroy') | jQuery object | Remove the linked sliders functionality from the given sliders. |
Contact Keith Wood at kbwood{at}iinet.com.au with comments or suggestions.