Okay
  Public Ticket #2974840
Multiple mobile navs
Closed

Comments

  • panpietruszewski started the conversation

    Hi,

    I found an error on the page. When I add two navigations with subnav, on mobile when I click ".sub-arrow" icon to open subnav it opens and hides. 

    This is happening because the frontend script is triggered twice for each navigation and in the frontent.js script, there is a global event for "sub-arrow" class.

    The solution for that is to limit appling "sub-arrow" event to single nav. Here is the part of the code should be changed (line: 6888):
    Before:

    subArrow: function subArrow() {
        var $ = jQuery;
        $(".sub-arrow").on("click", function (event) {
          event.preventDefault();
          $(this).parent().siblings("ul").slideToggle();
        });
      },


    After:

      subArrow: function subArrow() {
        var $ = jQuery;
        this.$element.find(".sub-arrow").on("click", function (event) {
          event.preventDefault();
          $(this).parent().siblings("ul").slideToggle();
        });
      },


  •  867
    Neuron replied

    Hi,

    I am very sorry for the late reply, we were not working on the weekend.

    Can you please provide me with your wp-admin, I will have a quick look to see what's going on.

    Feel free to ask for anything you need.

    Kind Regards


  • panpietruszewski replied

    I already fix that error in your plugin folder so it works on my theme. I wanted just to let you know that there is that problem so you could fix that for future updates.

    Basically, when you add two nav menus with at least 3 levels menu and you click the plus icon (on mobile) next to the element it opens and closes.

  •  867
    Neuron replied

    Hi,

    Glad to know that you've managed to solve it, and thanks for sharing it with us.

    Feel free to ask for anything you need.

    Kind Regards