css3媒体查询js与fancybox的冲突

时间:2013-09-29 22:22:45

标签: css css3 plugins fancybox media-queries

我正在尝试使用谷歌代码中的css3媒体查询js与fancybox一起使用。

由于某些原因,它们仅在Internet Explorer 9和10中发生冲突.Ie8以及Google Chrome和Mozilla Firefox都运行良好。

@hen我使用CSS3媒体查询javascript插件,点击fancybox弹出窗口,fancybox弹出窗口留空。它显示弹出窗口但内部没有内容。还会发生的是,当我单击fancybox弹出窗口时,激活fancybox的原始布局会变得缩放(巨大),而弹出窗口是正确的宽度/高度。

当我删除css3媒体查询时,一切都很好。谢谢你的帮助。

这些是我的magento page.xml中布局文件夹中使用的所有脚本:

<block type="page/html_head" name="head" as="head">
                <action method="addJs"><script>js/jquery/jquery-1.9.1.js</script></action>
                <action method="addJs"><script>js/jquery/no_conflict.js</script></action>
                <action method="addJs"><script>js/vendor/modernizr-2.6.2-respond-1.1.0.min.js</script></action>
                <action method="addJs"><script>js/jquery.lazyload.js</script></action>
                <action method="addJs"><script>js/loadlazy.js</script></action>
                <action method="addJs"><script>js/vendor/bootstrap.js</script></action>
                <action method="addJs"><script>js/jquery.cookie.js</script></action>
                <action method="addJs"><script>js/jquery.fancybox.pack.js</script></action>
                <action method="addJs"><script>js/jquery.fancybox-media.js</script></action>
                <action method="addJs"><script>js/jquery-ias.js</script></action>
                <action method="addJs"><script>js/ias-load.js</script></action>
                <action method="addJs"><script>prototype/prototype.js</script></action>
                <action method="addJs"><script>lib/ccard.js</script></action>
                <action method="addJs"><script>prototype/validation.js</script></action>
                <action method="addJs"><script>scriptaculous/builder.js</script></action>
                <action method="addJs"><script>scriptaculous/effects.js</script></action>
                <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
                <action method="addJs"><script>scriptaculous/controls.js</script></action>
                <action method="addJs"><script>scriptaculous/slider.js</script></action>
                <action method="addJs"><script>varien/js.js</script></action>
                <action method="addJs"><script>varien/form.js</script></action>
                <action method="addJs"><script>varien/menu.js</script></action>
                <action method="addJs"><script>mage/translate.js</script></action>
                <action method="addJs"><script>mage/cookies.js</script></action>

                <block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>

                <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
                <action method="addCss"><stylesheet>css/bootstrap-modal.css</stylesheet></action>
                <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
                <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
                <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>

                <action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
                <action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>

                <action method="addJs"><script>js/css3-mediaqueries.js</script></action>
            </block>

这就是我如何调用fancybox插件:

$jq191(".product-popup").fancybox({
        fitToView   : true,
        padding: 15,
        maxWidth    : browserWidth-25,
        maxHeight   : browserHeight-25,
        width        : '100%',
        height              : '100%',
        autoSize    : false,
        autoResize      : false,
        autoCenter      : true,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none',
        type: 'iframe',
        helpers : { overlay : { locked : false
                     } },
        afterShow : function(){
            var marginPercentage= 0.0706955530216648*2;
            viewWidth= browserWidth - marginPercentage*browserWidth;
            $jq191( '.product-view' ).width( viewWidth+'px');
        }
    });

这就是我所做的一切,我不认为还有其他任何与冲突问题有关的东西,但如果你知道,请告诉我,我会发布。感谢。

0 个答案:

没有答案