zoukankan      html  css  js  c++  java
  • 单webview上拉刷新下拉加载

    单个页面:

    <div id="pullrefresh" class="mui-content mui-scroll-wrapper" pageNumber="0" totalPages="0">
         <div class="mui-scroll" id="content">
       </div> </div>

    js:

    initPullRefresh("#pullrefresh");
    function initPullRefresh(selector) { mui(selector).pullRefresh({ container: selector,
    //下拉刷新容器标识,querySelector能定位的css选择器均可,比如:id、.class等 down: { callback: pulldownRefresh //必选,刷新函数,根据具体业务来编写,比如通过ajax从服务器获取新数据; }, up: { callback: pullupRefresh //必选,刷新函数,根据具体业务来编写,比如通过ajax从服务器获取新数据; } }); $(selector).on("tap", "#batteryChargingStation", function() { mui.openWindow({ url: 'map.html', id: 'map.html' }); }); $(selector).on("tap", ".batteryCharging", function() { mui.openWindow({ url: 'mapelse.html', id: 'mapelse.html' }); }); $(selector).on("tap", ".adimgs", function() { var data = { id: $(this).attr('data-id') }; goPagead('adInfo.html', data); }); }

          function goPagead(page, data) {
            mui.openWindow({
              url: page,
              id: page,
              extras: {
                data: data
              }
            });
          }

     
  • 相关阅读:
    10、Python的while与死循环
    8、 Python的if分支练习题
    7、 Python中的if多重判断
    6、Python的if判断和两重判断
    5、运算符
    4、数据类型:字典
    placeholder 颜色更改
    禁止video在苹果手机上的自动全屏播放
    点击label出发两次点击事件
    instanceof 和 typeof
  • 原文地址:https://www.cnblogs.com/ccllj/p/9638003.html
Copyright © 2011-2022 走看看