I am using jQuery Knob by anthonyterrien with step set to 20. I want to submit the value of the knob to the server. Problem is that change functions is called every time the user moves the knob using right click or left click(release is called only once if click is used ), and release is called every time the user uses scroll on knob. I want to somehow minimize or possible make only a single ajax call to the server, considering that the user is playing with the control.
here is the knob html :
<input class="knob" id="knob_imgid1" data-entryid="knob_imgid1" data-angleOffset=-125 data-angleArc=250 data-step="20" data-displayInput=false data-width="100%" data-fgColor="#428BCA" data-skin="tron" data-thickness=".1" value="20" />
Knob jquery :
$(".knob").knob({
change: function (value) {
value = parseInt(value, 10);
}
release: function (value) {
value = parseInt(value, 10);
}
});
result i desire :
$(".knob").knob({
change: function (value) {
//make an ajax call only the last time when this function was called
}
release: function (value) {
//make an ajax call only the last time when this function was called
}
});
The call results : https://i.stack.imgur.com/RS7S4.png1
Ultimately i want to minimize ajax calls or make a call once to send value:40 to the server (as per the image result)