简体   繁体   中英

WP + W3c Total Cache brokes responsive menu on Minify

i have a responsive website and i have activaded w3c total cache. whenever i Minify, the responsive menu is misssing. This menu is activated on specific screen sizes, the code is:

<div class="main-nav">
  <div id="responsive_current_menu_item">Welcome to Yum Yum Videos!</div>
    <ul id="menu-top-menu" class="menu">
      <li>...</li>
    </ul>
    <a id="responsive_menu_button"></a>
</div>

The problem is, that whenever i minify, the id="responsive_current_menu_item" and id="responsive_menu_button" simply dissapear from code.

you can see it in action here (is the top menu, w3c tocal cache is deactivated in order to show responsive menu)

any idea where i might take a look please? thanks a lot in advance

我已经解决了这样一个问题,即更改了性能部分中的缩小设置,当然我之前已经用空的缓存按钮还原了所有内容。我认为该错误是由压缩代码创建的...

We would need a little more input about how your menu works.

Just a guess: You responsive menu depends on jQuery, but jQuery is being loaded after the JS-Code for your menu has been loaded. It can't work that way. Try to change the minifying order and set the jQuery script to be loaded as first JS in all templates, embedded in the header.

Same applies to CSS-minifying.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM