page scrolling down Ajax How to get the data implemented (compatible mobile)
$ (window). Scroll (function () {var scrolltop = $ (this). ScrollTop ();
var scrollheight = $ (document). Height ();
var WindowHeight = $ (this). Height ();
if (scrolltop + windowheight >= scrollheight) {loadpromotions ();
}
});
var page = 1; var moravaliable = true;//Identity and data can load function loadpromotions () {if (moravaliable) {var href = Location.href . Split ('? ')
[0];
var pageSize = 5;
page++;
$.post (href, {pageno:page, pagesize:pagesize}, function (data) {
if (data.length) {var html = '; $.each (data, function (I, list) {html = ' <div class= ' task-time ' > ' + list.
Createtime + ' </div> '; html + + ' <a class= ' task-box ' href= ' + list.
Url + ' > '; HTML + = '
Scroll down above this page Ajax to get the data implementation method (compatible mobile phone) is a small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.