nivoslider doesn’t include a destroy or initializing method. after simulating destroy using the following code:
$('#slider').data('nivo:vars').stop = true;
$('#slider').find('div.nivo-slice').remove();
$('#slider').find('div.nivo-caption').remove();
$('#slider').find('div.nivo-controlNav').remove();
$('#slider').removeAttr("style");
$('#slider').empty();
$(window).unbind('keypress');
and using $('#silder').nivoSlider() again it get stuck at the first image.
Ok the best way is to forget about all the destroying thing and replace the silder with it’s initial state. suppose the initial state of silder is:
Then the best way to do the destroying and initializing at one step is to do something like: