Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions js/selectToUISlider.jQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jQuery.fn.selectToUISlider = function(settings){
tooltip: true, //show tooltips, boolean
tooltipSrc: 'text',//accepts 'value' as well
labelSrc: 'value',//accepts 'value' as well ,
minRange: 0,//minimal range between handles
sliderOptions: null
}, settings);

Expand Down Expand Up @@ -84,6 +85,15 @@ jQuery.fn.selectToUISlider = function(settings){
range: selects.length > 1,//multiple select elements = true
slide: function(e, ui) {//slide function
var thisHandle = jQuery(ui.handle);

// If multiple select is true this checks minimal
// range between handles
if (sliderOptions.range) {
if ((ui.values[1] - ui.values[0]) <= options.minRange - 1) {
return false;
};
};

//handle feedback
var textval = ttText(ui.value);
thisHandle
Expand Down