supersized plugin on ajax page

2019-05-14 12:01发布

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....
      });
};

1条回答
Evening l夕情丶
2楼-- · 2019-05-14 12:29

This message is to remove the question from the Unanswered list.

Is already solved in the main question through multiple editions.

查看更多
登录 后发表回答