$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>javascript - Custom JS doesn't work after 4.9.9 update|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - Custom JS doesn't work after 4.9.9 update

matteradmin9PV0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

After 4.9.9 update my custom JS code for a dropdown menu stopped working.

jQuery(document).ready(function( $ ) {
    // menu mobile
    $(function() {
      $(".e-mobile-menu__main-menu .menu-item-has-children > a").click(function(e) {
        e.preventDefault();
        $(this)
          .next("ul")
          .toggleClass("js-mobile-menu-open");
        $(".e-mobile-menu__main-menu .menu-item-has-children > a")
          .not(this)
          .next("ul")
          .removeClass("js-mobile-menu-open");
        $(".e-mobile-menu__main-menu .menu-item-has-children > a")
          .not(this)
          .removeClass("js-menu-active");
        $(this).toggleClass("js-menu-active");
      });
    });
    // menu desktop
    $(function() {
      $(".c-desktop-menu > div > ul > .menu-item-has-children > a").click(function(
        e
      ) {
        e.preventDefault();
        $(this)
          .next("ul")
          .toggleClass("js-menu-open");
        $(".c-desktop-menu > div > ul > .menu-item-has-children > a")
          .not(this)
          .next("ul")
          .removeClass("js-menu-open");
        $(".c-desktop-menu > div > ul > .menu-item-has-children > a")
          .not(this)
          .removeClass("js-menu-active");
        $(this).toggleClass("js-menu-active");
      });
    });
    });

This is my site: /. What's wrong?

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 6 years ago.

Improve this question

After 4.9.9 update my custom JS code for a dropdown menu stopped working.

jQuery(document).ready(function( $ ) {
    // menu mobile
    $(function() {
      $(".e-mobile-menu__main-menu .menu-item-has-children > a").click(function(e) {
        e.preventDefault();
        $(this)
          .next("ul")
          .toggleClass("js-mobile-menu-open");
        $(".e-mobile-menu__main-menu .menu-item-has-children > a")
          .not(this)
          .next("ul")
          .removeClass("js-mobile-menu-open");
        $(".e-mobile-menu__main-menu .menu-item-has-children > a")
          .not(this)
          .removeClass("js-menu-active");
        $(this).toggleClass("js-menu-active");
      });
    });
    // menu desktop
    $(function() {
      $(".c-desktop-menu > div > ul > .menu-item-has-children > a").click(function(
        e
      ) {
        e.preventDefault();
        $(this)
          .next("ul")
          .toggleClass("js-menu-open");
        $(".c-desktop-menu > div > ul > .menu-item-has-children > a")
          .not(this)
          .next("ul")
          .removeClass("js-menu-open");
        $(".c-desktop-menu > div > ul > .menu-item-has-children > a")
          .not(this)
          .removeClass("js-menu-active");
        $(this).toggleClass("js-menu-active");
      });
    });
    });

This is my site: https://www.manufakturamocy.pl/. What's wrong?

Share Improve this question edited Dec 19, 2018 at 14:26 RiddleMeThis 3,8078 gold badges22 silver badges30 bronze badges asked Dec 19, 2018 at 14:22 DamianDamian 971 gold badge1 silver badge11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

you do have your menu JS code currently 2 times on the page.

  1. in https://www.manufakturamocy.pl/mm/wp-content/cache/minify/b6a70.default.include-body.8cc603.js
  2. and in https://www.manufakturamocy.pl/mm/wp-content/themes/mmocy/js/script.js?ver=4.9.9

which causes your menu open and close in the same time.

maybe a problem with your cache and JS minify plugin.

Post a comment

comment list (0)

  1. No comments so far