基本信息
源码名称:juqery mobile 上啦刷新,下拉加载
源码大小:0.02M
文件格式:.rar
开发语言:js
更新时间:2016-06-22
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍

juqery mobile  上拉刷新,下拉加载



<!DOCTYPE html>
<html>
<head>
<title>jQuery手机端上拉刷新下拉加载更多页面 - 爱编程w2bc.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="r/reset.css" />
<link rel="stylesheet" href="r/pullToRefresh.css" />
<script src="r/iscroll.js"></script>
<script src="r/pullToRefresh.js"></script>
<script src="r/colorful.js"></script>
<style type="text/css" media="all">
body, html {
padding: 0;
margin: 0;
height: 100%;
font-family: Arial, Microsoft YaHei;
color: #111;
}

li {
/*border-bottom: 1px #CCC solid;*/
text-align: center;
line-height: 80px;
}
</style>
</head>
<body>
<div id="wrapper">
<ul>
<li>row 10</li>
<li>row 9</li>
<li>row 8</li>
<li>row 7</li>
<li>row 6</li>
<li>row 5</li>
<li>row 4</li>
<li>row 3</li>
<li>row 2</li>
<li>row 1</li>
</ul>
</div>
<script>
/*
for (var i = 0; i < document.querySelectorAll("#wrapper ul li").length; i ) {
document.querySelectorAll("#wrapper ul li")[i].colorfulBg();
}
*/
refresher.init({
id: "wrapper",//<------------------------------------------------------------------------------------┐
pullDownAction: Refresh,
pullUpAction: Load
});
var generatedCount = 0;
function Refresh() {
setTimeout(function () { // <-- Simulate network congestion, remove setTimeout from production!
var el, li, i;
el = document.querySelector("#wrapper ul");
el.innerHTML = '';
for (i = 0; i < 11; i ) {
li = document.createElement('li');
li.appendChild(document.createTextNode('async row ' ( generatedCount)));
el.insertBefore(li, el.childNodes[0]);
}
wrapper.refresh();/****remember to refresh after action completed! ---yourId.refresh(); ----| ****/
/*
for (var i = 0; i < document.querySelectorAll("#wrapper ul li").length; i ) {
document.querySelectorAll("#wrapper ul li")[i].colorfulBg();
}
*/
}, 1000);

}

function Load() {
setTimeout(function () {// <-- Simulate network congestion, remove setTimeout from production!
var el, li, i;
el = document.querySelector("#wrapper ul");
for (i = 0; i < 2; i ) {
li = document.createElement('li');
li.appendChild(document.createTextNode('async row ' ( generatedCount)));
el.appendChild(li, el.childNodes[0]);
}
wrapper.refresh();/****remember to refresh after action completed!!! ---id.refresh(); --- ****/
/*
for (var i = 0; i < document.querySelectorAll("#wrapper ul li").length; i ) {
document.querySelectorAll("#wrapper ul li")[i].colorfulBg();
}
*/
}, 1000);
}
</script>
</body>
</html>