革命滑块高度

时间:2015-05-20 11:16:42

标签: jquery css wordpress wordpress-plugin

我正在为我的网站使用wordpress revolution滑块插件。我为主页主滑块设置了全屏高度。滑块高度根据屏幕分辨率设置。但我想从滑块高度中排除页眉和页脚高度。我还对setREVStartSize()函数进行了更改。这是实际的代码

var setREVStartSize = function() {
                var tpopt = new Object();
                    tpopt.startwidth = <?php echo $this->slider->getParam("width","900")?>;
                    tpopt.startheight = <?php echo $this->slider->getParam("height","300")?>;
                    tpopt.container = jQuery('#<?php echo $this->sliderHtmlID?>');
                    tpopt.fullScreen = "<?php echo $optFullScreen?>";
                    tpopt.forceFullWidth="<?php echo $this->slider->getParam("force_full_width", 'off'); ?>";

                tpopt.container.closest(".rev_slider_wrapper").css({height:tpopt.container.height()});tpopt.width=parseInt(tpopt.container.width(),0);tpopt.height=parseInt(tpopt.container.height(),0);tpopt.bw=tpopt.width/tpopt.startwidth;tpopt.bh=tpopt.height/tpopt.startheight;if(tpopt.bh>tpopt.bw)tpopt.bh=tpopt.bw;if(tpopt.bh<tpopt.bw)tpopt.bw=tpopt.bh;if(tpopt.bw<tpopt.bh)tpopt.bh=tpopt.bw;if(tpopt.bh>1){tpopt.bw=1;tpopt.bh=1}if(tpopt.bw>1){tpopt.bw=1;tpopt.bh=1}tpopt.height=Math.round(tpopt.startheight*(tpopt.width/tpopt.startwidth));if(tpopt.height>tpopt.startheight&&tpopt.autoHeight!="on")tpopt.height=tpopt.startheight;if(tpopt.fullScreen=="on"){tpopt.height=tpopt.bw*tpopt.startheight;var cow=tpopt.container.parent().width();var coh=jQuery(window).height();if(tpopt.fullScreenOffsetContainer!=undefined){try{var offcontainers=tpopt.fullScreenOffsetContainer.split(",");jQuery.each(offcontainers,function(e,t){coh=coh-jQuery(t).outerHeight(true);if(coh<tpopt.minFullScreenHeight)coh=tpopt.minFullScreenHeight})}catch(e){}}tpopt.container.parent().height(coh);tpopt.container.height(coh);tpopt.container.closest(".rev_slider_wrapper").height(coh);tpopt.container.closest(".forcefullwidth_wrapper_tp_banner").find(".tp-fullwidth-forcer").height(coh);tpopt.container.css({height:"100%"});tpopt.height=coh;}else{tpopt.container.height(tpopt.height);tpopt.container.closest(".rev_slider_wrapper").height(tpopt.height);tpopt.container.closest(".forcefullwidth_wrapper_tp_banner").find(".tp-fullwidth-forcer").height(tpopt.height);}
            };

            /* CALL PLACEHOLDER */
            setREVStartSize();

以下是我的网站demo link

的链接

0 个答案:

没有答案