#Java Web Rollup # about MUI Slide-up and pull-down loading

Source: Internet
Author: User

In fact, according to the MUI document to write, there is no problem:

In the JSP:

<%@ page contenttype= "Text/html;charset=utf-8" language= "java"%>



<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"/>


<body>

<div id= "surverylist" class= "Mui-content mui-scroll-wrapper" >
<div class= "Mui-scroll" >
<!--data List--
<ul class= "Mui-table-view mui-table-view-chevron toollist" >
<li class= "Mui-table-view-cell" >
6th option Clamp Item-8
</li>
<li class= "Mui-table-view-cell" >
6th option Clamp Item-8
</li>
</ul>
</div>
</div>

</body>


<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>

In JS:

$ (function () {    addlistrefresh ();}); function Addlistrefresh () {    mui.init ({        pullrefresh: {            container: ' #surveryList ', down            : {                height : 50,//Optional. Default 50. Trigger Pull-up load drag distance                auto:false,//optional, default false. Auto-Pull load once                Contentrefresh: "Refreshing ...",//optional, when loading state, The caption content displayed on the pull-load control                callback:pulldownrefreshmysurvery            }}    );} function Pulldownrefreshmysurvery () {    setTimeout (function () {        mui (' #surveryList '). Pullrefresh (). Endpulldowntorefresh ();    }, 500);}

Above:

This time very want to record, is because, in this code in the go quite many detours. Depending on the requirements, the following label (tab) and Upper label (segment) are used to manage the different Table-item displays with a single file.

Cause in the same JSP file, you need to have multiple tableview drop-down or pull-up refreshes.

Tried a lot of methods, but also looked up many information, are not very good solution, those bad methods (Mui.pullToRefresh.js) also do not record.

Finally helpless, or use the IFRAME to complete these.

Fortunately, each sub-page, only init one ID of the pull-up or pull-down, MUI is still very good support.

#Java Web Rollup # about MUI Slide-up and drop-down loading

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.