I need to use supersized plugin on my ajax page. But i think there's no any destroy function for supersized. How can i set supersized again when i call my function below?
Solution:
if($.supersized.vars.slideshow_interval){
clearInterval($.supersized.vars.slideshow_interval);
};
just add this to supersized gallery close button...
function getSuperSized(arr,startSlide){
$(".myPageHolder").hide();
$("body").append("<div class='supersizedHolder'></div>");
$("#supersized-loader").remove();
$("#supersized").remove();
$(".supersizedHolder").append("<div id='supersized-loader'></div><ul id='supersized'></ul>")
$("#supersized-loader").show();
$("#supersized").show();
var innerContent= supersized elements goes here...
$(".supersizedHolder").append(innerContent);
$(".closeSupersized") /*remove supersized holder and back to page*/
.click(function(){
/*solution*/
if($.supersized.vars.slideshow_interval){
clearInterval($.supersized.vars.slideshow_interval);
};
//
$(".myPageHolder").show();
$(".supersizedHolder").remove();
});
var superSizedImages=[];
for(var i=0;i<arr.length;i++){
var img=pageUrl+"assets/content/large/"+arr[i].media.content[0].media
superSizedImages.push({image : img, title : '', thumb : '', url : ''})
};
$.supersized({
options goes here....
});
};
This message is to remove the question from the Unanswered list.
Is already solved in the main question through multiple editions.