jslider icon indicating copy to clipboard operation
jslider copied to clipboard

Some event handling for jslider

Open marlonlom opened this issue 13 years ago • 1 comments

Grettings,

How can you handle the event that runs when I stop moving the slide control and adjust the value to use, and so my form update automatically using the plugin?

marlonlom avatar Sep 28 '12 14:09 marlonlom

You can already set the callback function which is called on mouseup. If you want a 'slidden' event, modify the jSliderPointer.prototype.onmouseup function like this:

jSliderPointer.prototype.onmouseup = function( evt ){
      if( this.parent.settings.callback && $.isFunction(this.parent.settings.callback) )
        this.parent.settings.callback.call( this.parent, this.parent.getValue() );

      this.parent.inputNode.trigger("slidden", this.parent.getValue()); //add this line

      this.ptr.removeDependClass("hover");
    };

roelarents avatar Oct 31 '12 13:10 roelarents