How to append a static element to a JS carousel?

I have a javascript-only image gallery (NextGEN wordpress plugin)

It is built dynamically with one JS file. It displays content as you click through the carousel.

Read More

The rough outline of the JS file is:

function buildPanels() {
        // If panel overlay content exists, add the necessary overlay background DIV
        // The overlay content and background are separate elements so the background's opacity isn't inherited by the content
        j_panels.each(function(i){
            if($('.panel-overlay',this).length>0) {
                $(this).append('<div class="overlay-background"></div>');   
            }
        });

It builds the whole carousel at once and then displays only the current image/description. Then it assigns some CSS based on conditions/dimensions etc.

I’d like to convert the DIV that is created by the code above into a static DIV, which only is shown once and remains there, while the rest of the elements in the loop cycle in accordance with the carousel. But I’d like to to still be the child of .panel-overlay (which is not a static element)

Related posts

Leave a Reply