im having an issue to reinitialize new slides on flexslider after of a callback and 4 slides were swiped/used, it won't work.
There an jsfiddle you may want to check it.
Also notice they implemented new functions are slide.add() and slide.remove() via https://github.com/woothemes/FlexSlider there no further information about these new functions. I had no idea how to use them, then i tried it but it didn't work.
I would need a function like a cycle when you swipe back it restores old slides and removes new slides, then you swipe foward, it removes old slides and add new slides due to DOM memory performance on mobile devices.
Any help or suggestion like iframe, ajax load HTML on this would be really appreciated.
Thank You!
I was able to fix it with some property exploring:
end: function(slider){
// remove all but the last slide
slider.slides.not(":last").map(function(idx, slide) { slider.removeSlide(slide); });
slider.currentSlide = 0;
slider.count = 1; // 1 because we left 1 slide
// add slides here
slider.addSlide('<li>...');
}
If you want to remove all of the slides, just remove the .not(":last")
from the first part and set slider.count = 0
.
It seems a bug on the removeSlide
and addSlide
functions, so I've reseted the values and it worked.