• 单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
              }
            });
          }

     
  • 相关阅读:
    TestPaste text
    WPF XML序列化保存数据 支持Datagrid 显示/编辑/添加/删除数据
    C# WPF xml序列化 反序列化
    C# show FTP Download/Upload progress
    BAT for 循环
    C# httpRequest Soap请求
    day6 os模块
    day6 random随机数模块
    day6 time和datetime模块
    day5 常用模块json和pickle
  • 原文地址:https://www.cnblogs.com/ccllj/p/9638003.html
Copyright © 2020-2023  润新知