Topic: Unload gallery

I'm using jQuery to load different galleries into a single <div id="sv-container"></div> on my main page. My code is working fine, but I need a way to unload the <div id="sv-container"></div>. Any suggestions? Here are the key elements I'm using:

<script type="text/javascript">
    var flashvars1 = {};
    var params = {};
    var attributes = {};
    flashvars1.galleryURL = "gallery_home.xml";
</script>

<script type="text/javascript">
    var flashvars2 = {};
    var params = {};
    var attributes = {};
    flashvars2.galleryURL = "gallery_studio.xml";
</script>

<script type="text/javascript">

$(document).ready(function(){

    // load gallery1 into sv-container div on main page
    $("#link1").click(function(){
    SV.simpleviewer.load('sv-container', '505', '360', 'transparent', true, flashvars1, params, attributes, false);
    });

    // load gallery2 into sv-container div on main page
    $("#link2").click(function(){
    SV.simpleviewer.load('sv-container', '505', '360', 'transparent', true, flashvars2, params, attributes, false);
    });
    
    // remove gallery1 or gallery2 in sv-container div on main page
    $("#link3").click(function(){
    // code to remove gallery in sv-container div on main page ????
    });
    
});

</script>

<div id="sv-container"></div>

Re: Unload gallery

Have you tried using dispose() from the SimpleViewer API?

Mike Richards
SimpleViewer Support Team.

Re: Unload gallery

That would seem to do it. Thanks for the tip!