I'm having some issues when trying to renew the nivoslider when loading dynamic content. What I need to do is update the slider when I load new content in through an AJAX
call.
So basically I have a div that gets new data in from a function AJAX
call and after the load I would need the slider to reinitialize.
What I do right now is this:
if ($('#imageSlider').find('div.nivo-slice').length > 0) {
$('#imageSlider').data('nivoslider').stop();
$('#imageSlider').removeData('nivo:vars');
$('#imageSlider').removeData('nivoslider');
$('#imageSlider').attr("class","");
$('#imageSlider').attr("style","");
}
$('#imageSlider').html(newImages);
and then a call to $('#imageSlider').nivoSlider();
It kinda works but the rotation gets stuck on one picture only and sometimes it just doesn't load. Any help on this would be greatly appreciated.