jquery mobile Touch事件

Touch事件在用户触摸屏幕(页面)时触发

1.jquery mobile tap

tap事件在用户敲击某个元素时触发

$("p").on("tap",fucntion(){

    $(this).hide();

});

2.jquery mobile taphold

taphold事件在用户敲击某个元素并保持一秒时被触发

3.jquery mobile swipeleft

swipeleft 事件在用户在某个元素上从左滑动超过30px时被触发

扫描二维码关注公众号,回复: 5312553 查看本文章

$("p").on("swipeleft",fucntion(){

    alert("left");

});

4.jquery mobile swipe

swipe事件在同虎仔某个元素上水平滑动30px时被触发

jquery mobile事件 的滚动事件

提供两种滚动事件:在滚动开始和当滚动结束

1.jquery mobile scrollstart

scrollstart事件在用户开始滚动页面时被触发

$(document).on("scrollstart",function(){

    alert("scroll start");

});

2.jquery mobile scrollstop

scrollstop事件在用户停止滚动页面时被触发

$(document).on("scrollstop",function(){

    alert("scroll stop");

});

猜你喜欢

转载自www.cnblogs.com/growydp/p/10429572.html