---restore content starts---
Environmental Appcan
Appcan.ready (function() {page= 1; Type= 0; Searchdate=Getnowtime (); Highsearch (type); Appcan.frame.setBounce ([0,1],function(type) {//$ ("#pullstatus" +type). html (!type? "). Start drop down ":" Start on Drag ");},function(type) {//$ ("#pullstatus" +type). html (!type? "). Pull over the tipping point and produce the event! ":" Over the tipping point, the event has been generated! ");},function(type) {//$ ("#pullstatus" +type). HTML ("Let go, generate events, start updating data! ");SetTimeout (function() {appcan.frame.resetBounce (type); //$ ("#pullstatus" +type). HTML (""); if(type==0){ //Drop-down refreshpage = 1; Highsearch (type); }Else if(type==1){ //Pull up load next pagepage++; Highsearch (type); } }, 1000); }); });
Add the above code to the Ready function, and the page is used to record paging, and type is used to determine whether the drop-down refresh or pull-up loads the next page of news.
The function to load the news is to have the page property to load the corresponding paging, and to have the if of the type judged.
For example
if (Type = = 1) { $ ("#searchHighResult"). Append (str); Appcan.window.openToast ("Loading Complete", 5, 0); Else { $ ("#searchHighResult"). html (str); Appcan.window.openToast ("Refresh succeeded", 5, 0); }
Note that append and html,append are additional
Faux Headline news app, pull-down refresh, pull-up load paging