I created iScroll on my webpage and it was working very well. But now i want to make it work as infinite iscroll, but i don't know how to do that.
my iscroll code is:
myCarousel_up = new iScroll('scroller_upCarousel', {
snap: true,
momentum: false,
hScrollbar: false,
vScrollbar: false,
desktopCompatibility:true,
onScrollEnd: function () {
}
});
Can anyone help me?
First you need to add iscroll-infinite.js
then you need to write ajax function to load or append data in infinite loop.
Also call iScroll loaded function with ajax function
Please refer below link for demo.
http://lab.cubiq.org/iscroll5/demos/infinite/
You could use ajax functoin like: