Javascript 如何将静态元素附加到JS旋转木马?

Javascript 如何将静态元素附加到JS旋转木马?,javascript,css,wordpress,overflow,nextgen-gallery,Javascript,Css,Wordpress,Overflow,Nextgen Gallery,我有一个只使用javascript的图像库NextGEN wordpress插件 它是用一个JS文件动态构建的。它在您单击旋转木马时显示内容 JS文件的大致轮廓如下: function buildPanels() { // If panel overlay content exists, add the necessary overlay background DIV // The overlay content and background are separa

我有一个只使用javascript的图像库NextGEN wordpress插件

它是用一个JS文件动态构建的。它在您单击旋转木马时显示内容

JS文件的大致轮廓如下:

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>');   
            }
        });
它一次构建整个旋转木马,然后仅显示当前图像/描述。然后根据条件/维度等分配一些CSS

我想将上面代码创建的DIV转换为静态DIV,它只显示一次并保留在那里,而循环中的其余元素按照旋转木马循环。但我仍然想成为.panel overlay的孩子,它不是一个静态元素

站点似乎已关闭: