Jquery Mobile Slider change event

后端 未结 10 1913
独厮守ぢ
独厮守ぢ 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:21

    I'm not too familiar with jquery mobile, but adding a change handler to the original input element should do:

    $('#slider-1').change(function(){
        var slider_value = $(this).val()
        console.log(slider_value)
        // do whatever you want with that value...
    })
    

    Hope this help,

    Martin

提交回复
热议问题