標籤:重新整理 3.0.0 highlight jquer 不同 上拉載入 common time auto
其實按照MUI的文檔去寫,也沒什麼問題:
JSP中:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<title></title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="/resources/mui/mui.min.css" />
</head>
<body>
<div id="surveryList" class="mui-content mui-scroll-wrapper">
<div class="mui-scroll">
<!--資料列表-->
<ul class="mui-table-view mui-table-view-chevron toolList">
<li class="mui-table-view-cell">
第6個選項卡子項-8
</li>
<li class="mui-table-view-cell">
第6個選項卡子項-8
</li>
</ul>
</div>
</div>
</body>
</html>
<script src="/resources/mui/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/resources/js/lib/jquery-3.0.0.min.js" type="text/javascript"></script>
<script src="/resources/js/common/common.js" type="text/javascript"></script>
<script src="/resources/js/common/network.js" type="text/javascript"></script>
<script src="/resources/js/unique/survery/surveryforSupport.js" type="text/javascript"></script>
在js中:
$(function(){ AddListRefresh();});function AddListRefresh() { mui.init({ pullRefresh: { container: ‘#surveryList‘, down: { height: 50,//可選.預設50.觸發上拉載入拖動距離 auto: false,//可選,預設false.自動上拉載入一次 contentrefresh: "正在重新整理...",//可選,正在載入狀態時,上拉載入控制項上顯示的標題內容 callback: pulldownRefreshMySurvery } } });}function pulldownRefreshMySurvery(){ setTimeout(function() { mui(‘#surveryList‘).pullRefresh().endPulldownToRefresh(); }, 500);}
以上:
本次十分想記載一下,是因為,在本次的code中走了蠻多彎路。根據需求,使用了下標籤(tab)和 上標籤(segment),本使用同有個檔案來管理不同的table-item顯示。
造成在同一個jsp檔案中,需要有多個tableview的下拉或上拉重新整理。
嘗試了很多種方法,也查了很多資料,都不能很好的解決,那些不好的方法(mui.pullToRefresh.js)也就不記載了。
最後無奈,還是把使用iframe來完成這些。
還好,每個子頁面中,只init一個id的上拉或下拉,MUI還是能很好的支援。
#Java Web累積#關於MUI的上滑和下拉載入