3

I have been using iScroll4 for my work from quiet a time

Though I am facing an issue using it for a case where along with dynamic addition of elements at one end I also need to remove elements from other end. As in my work I might have to add a lot of data (which holds images) dynamically but I want to maintain same number of child elements in order to manage the memory/performance issue. It would of great help if any one can suggest me any approach to do it.

aularon
  • 11,042
  • 3
  • 36
  • 41

1 Answers1

0

You need to add or delete the elements from particular container using jquery.

And while adding and deleting the contents, you need to refresh the iScroll.

Say for example you create an iscroll as,

var myScroll = new iScroll('scrollwrapper', {   });

Then after ever addition or deletion of scrollwrapper contents, refresh the iScroll, so as to work it properly.

myScroll.refresh();
Mazzu
  • 2,799
  • 20
  • 30