jQueryMobile: how to work with slider events?

后端 未结 9 1438
南方客
南方客 2020-12-09 05:32

I\'m testing the slider events in jQueryMobile and I must been missing something.

page code is:

9条回答
  •  伪装坚强ぢ
    2020-12-09 05:54

    I found a much simpler solution to this problem. Using this code, you can retrofit start and stop events onto the slider.

    $('.ui-slider').live('mousedown', function(){$('#'+id).trigger('start');});
    $('.ui-slider').live('mouseup', function(){$('#'+id).trigger('stop');});
    $('.ui-slider').live('touchstart', function(){$('#volumeSlider').trigger('start');});
    $('.ui-slider').live('touchend', function(){$('#volumeSlider').trigger('stop');});
    

提交回复
热议问题