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
Rob i investigated this and find the solution
You need to modify your functions like this
function flexInit() {
$('.flexslider').flexslider({
animation: "slide",
controlsContainer: ".paginator",
manualControls: 'a',
after: function(slider){
if(slider.atEnd == true) {
slider.addSlide(galBuild());
}
}
});
}
function galBuild() {
$.getJSON("/gallery/next/"+galID, function (data) {
var results = data.objects;
var i = 0;
$.each(results, function () {
return ('' + results[i].title + '
');
});
});
}
flexInit();
Also you need to do some cosmetic changes in flexSlider.js file in slider.update function. right now its not checking the position variable if it comes undefined, so you will have to check this as well.