pullDownAction(); // Execute custom function (ajax call?)
}
}
});
document.addEventListener('touchmove', function (e) {e.preventDefault(); }, false);
});
</script>
</body>
</html>
the page one is the default page of my application. Here page1 loads at that time iscroll works perfect with pull to refresh functionality. but when i click on second page (page2) link and when it loads page2 at that time iscoll is not working and not showing any error too.
i have tried myScroll.refresh() and myScroll.destroy() functions on each page
I have applied scrolling to the navigation bar using iscroll-4 (www.cubiq.org). It works fine with page refresh. But when i navigate to the different page, it stop working.
The code i have used is :
<script src="./iscroll.js"></script>
<script>
$(document).ready(function(){
FooNavScroll = new iScroll('footerwrapper',{hScroll: true, vScroll: false, hScrollbar: true });
this code works on each page if i have went there directly. but when i go through navigation then it doesnt work. What i know is:
$(document).ready(function(){
FooNavScroll = new iScroll('footerwrapper',{hScroll: true, vScroll: false, hScrollbar: true });
});
this function will not gonna call on each navigation it will only call on page refresh/new visit. so i try to put this code in 'pageshow function like:
$("div:jqmData(role='page')").live('', function () {
FooNavScroll = new iScroll('footerwrapper',{hScroll: true, vScroll: false, hScrollbar: true });
});
but this is not working at all. can any one please tell me why this is happening?
From past few days i was trying to use scrollview in one of my project. But there is no official scrollview support is available from JQuery Mobile. I came to know about iscroll-4 (www.cubiq.com). Its quite good. they provides scollview, pull to refresh and other usefull functionality. But use of only iscroll.js is not enough to get good scrollview.