mmenu和谷歌发布商标签兼容吗?

时间:2014-08-11 07:23:10

标签: google-dfp mmenu

当页面加载css格式并且html结构似乎丢失并且所有进一步的javascript执行停止时,mmenu在与Google发布器标签(异步)一起使用时崩溃页面。可以通过在mmenu download的演示文件中添加google publisher标记来复制它。

<!DOCTYPE html>
<html>
    <head>
<script type='text/javascript'>
(function() {
var useSSL = 'https:' == document.location.protocol;
var src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
})();
</script>
<script type='text/javascript'>
googletag.defineSlot('/5910/symall/ROS', [1, 1], 'div-gpt-ad-1403693262284-0').addService(googletag.pubads());
googletag.pubads().enableSyncRendering();
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs(); 
googletag.enableServices();
</script>


        <meta charset="utf-8" />
        <meta name="author" content="www.frebsite.nl" />
        <meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />

        <title>jQuery.mmenu demo</title>

        <link type="text/css" rel="stylesheet" href="css/demo.css" />
        <link type="text/css" rel="stylesheet" href="../src/css/jquery.mmenu.css" />

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript" src="../src/js/jquery.mmenu.min.js"></script>
        <script type="text/javascript">

        $.fn.mmenu.debug = function( msg ) {
   console.log( msg );
};
            $(function() {
                $('nav#menu').mmenu();
            });

        </script>
    </head>
    <body>
        <div id="page">
            <div class="header">
                <a href="#menu"></a>
                Demo
            </div>
            <div class="content">
                <p><strong>This is a demo.</strong><br />
                    Click the menu icon to open the menu.</p>
                <p>For more demos, a tutorial, documentation and support, please visit <a href="http://mmenu.frebsite.nl" target="_blank">mmenu.frebsite.nl</a></p>
            </div>
            <nav id="menu">
                <ul>
                    <li><a href="#">Home</a></li>
                    <li><a href="#about">About us</a>
                        <ul>
                            <li><a href="#about/history">History</a></li>
                            <li><a href="#about/team">The team</a>
                                <ul>
                                    <li><a href="#about/team/management">Management</a></li>
                                    <li><a href="#about/team/sales">Sales</a></li>
                                    <li><a href="#about/team/development">Development</a></li>
                                </ul>
                            </li>
                            <li><a href="#about/address">Our address</a></li>
                        </ul>
                    </li>
                    <li><a href="#contact">Contact</a></li>
                </ul>
            </nav>
        </div>

                <!-- SYMALL/ROS -->
        <div id='div-gpt-ad-1403693262284-0'>
        <script type='text/javascript'>
                        googletag.display('div-gpt-ad-1403693262284-0');
        </script>
        </div>

    </body>
</html>

0 个答案:

没有答案