jQuery moblie 配合jQuery 实现移动端下拉刷新

<script type="text/javascript" src="http://bj.jiaju001.com/static/js/jquery-1.9.0.js">
<script type="text/javascript" src="static/js/wsq/jquery.mobile.custom.min.js">    

<script type="text/javascript">
var scrollstart_top,scrollstop_top,is_swipe;
$(document).on("scrollstart",function(){
    scrollstart_top = $(document).scrollTop();   
    is_swipe = false;
});
$(document).on("scrollstop",function(){   
    if(!is_swipe && $(document).scrollTop() == 0 && $(document).scrollTop() == scrollstart_top && scrollstop_top == $(document).scrollTop()){
        window.location.reload();
    }
    scrollstop_top= $(document).scrollTop();
});
$(document).on("swipe",function(){
    is_swipe = true;
});
</script>

 

posted @ 2016-12-19 15:48  DoubleLife  阅读(3262)  评论(0编辑  收藏  举报