Issue #62 new

duplicated content after execute $.superbox(); twice

Juan Jose Zermeño
created an issue

i have this code i execute superbox at the main load page, but when i use $("#divloader").load the links loaded never works so i call again superbox function..

$(document).ready(function(){ $.superbox.settings = { boxId: "superbox", // Id attribute of the "superbox" element boxClasses: "", // Class of the "superbox" element overlayOpacity: .9, // Background opaqueness boxWidth: "600", // Default width of the box boxHeight: "600", // Default height of the box loadTxt: "Cargando...", // Loading text closeTxt: "Cerrar", // "Close" button text

};
$.superbox();


$('#listas').click(function() {
    $("#divloader").load("listas.php", function(response, status, xhr) {
                          if (status == "error") 
                                alert("El servidor no responde");
                          if(status == "success"){
                             $.superbox().unbind();
                             $.superbox();
                          }

    });

});

but now i have some throubles ... when i click in one of the main content links the superbox content is loaded twice...

http://i43.tinypic.com/k96wpy.jpg

how can avoid this?