Jquery Mobile Slider change event

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

    I highly suggest checking out w3schools tutorial on this.

    http://www.w3schools.com/jquerymobile/jquerymobile_events_intro.asp

    The crucial piece of code that you are missing is:

    $(document).on("pageinit","#pageone",function(){
        // PLACE ALL YOU EVENTS CODE HERE e.g.
        $( "#slider" ).on( 'slidestop', function( event ) { 
            alert ('hi');  
        });
    }
    

    Make sure your content is prefixed with:

提交回复
热议问题