Jquery Mobile Slider change event

后端 未结 10 1906
独厮守ぢ
独厮守ぢ 2021-01-02 11:14

I have a jquery mobile slider on a simple page. When I drag the slider, the value updates as expected in the textbox. I have looked but cannot find where this logic is happe

10条回答
  •  孤独总比滥情好
    2021-01-02 11:30

    try this:

    var self = this;
    this.sliderTouchUp = function() {
        var currentVal = $('#slider-1').val();
        console.log("val change to " + currentVal);
    };
    $('.ui-slider').live('mouseup', self.sliderTouchUp);
    $('.ui-slider').live('touchend', self.sliderTouchUp);
    

提交回复
热议问题