日期:2014-05-16 浏览次数:20690 次
//支持滚动加载 就是这个事件 在选择了下拉框,在滚动加载数据的时候 会请求两遍
var _SolStatus = 0;
if (param.scroll && param.ajaxServer != '' && param.boxParam != '' && parseInt(param.scrollBoxNumber) > 0) {
$(window).scroll(function() {
var scrollh = document.body.scrollHeight;
var clienth = document.documentElement.clientHeight;
var scrollt = document.documentElement.scrollTop + document.body.scrollTop;
if (scrollt + clienth >= scrollh && _SolStatus == 0 && _init == 1 && !_isnoShow) {
if ((param.maxPage == 0 || param.pageNumber <= param.maxPage)) {
_SolStatus = 1;
if (param.loadSelector != '') {
$(param.loadSelector).show();
}
var postPara = {};
postPara[param.boxParam] = parseInt(param.scrollBoxNumber);
postPara[param.pageParam] = parseInt(param.pageNumber);
setTimeout(function() {
$.getJSON(param.ajaxServer, postPara, function(data) {
if (data.length == 0) {