krisrak / appframework-templates

HTML5 Mobile App UI templates created using Intel App Framework
MIT License
119 stars 100 forks source link

Pull 2 refresh ios #8

Open bloodguard opened 9 years ago

bloodguard commented 9 years ago

Is it normal that when i add a pull to refresh on a scroller, some elements of a list on ios are no longer loaded? Or is it that i did something wrong ? Here is my code

function addRefreshToScroller(target_name) { var page_scroller = $(target_name).scroller(); page_scroller.addInfinite(); $.bind(page_scroller,"infinite-scroll",function(){ var count = document.getElementsByClassName("list-text").length; var first = true; var multiple = count / 25; if(count < 100) { jobSearch(multiple,true,page_scroller); } $.bind(page_scroller,"infinite-scroll-end",function(){ $.unbind(page_scroller,"infinite-scroll-end"); page_scroller.scrollToBottom(); setTimeout(function(){ self.clearInfinite(); },1000); }); }); }