I am trying to reinitialize FlexSlider with out page refresh when a new gallery listing is called asynchronously.
I would think the routine below would work but it d
The most easy way is to remove the flexscroll from element dataset
function flexInit() {
$('.flexslider').flexslider({
animation: "slide",
controlsContainer: ".paginator",
manualControls: 'a',
after: function(slider){
if(slider.atEnd == true) {
slider.addSlide(galBuild());
}
}
});
}
//this remove flexslider form element dataset
$('.flexslider').removeData("flexslider");
and now you are free to call
flexInit();
and your flexslider will be recreated.