Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1396733

    Hello.
    I have a link in the nav built as an overview for the sub links. This page can be called up in the desk menu. In the burger, the link appears and when you click on it, the subpages become visible. But I can’t click on this link in the burger. How do I do that? I would like to be able to click on this link in the burger as well to go to the page and not just for the show of the child links.

    #1396736

    Hey frasche,
    Please use the theme settings at Enfold Theme Options ▸ Main Menu ▸ Burger/Mobile Menu ▸ Clone title menu items to submenu
    Then will clone the parent menu item so that in it’s dropdown on mobile you will have the option to go to the parent item link.
    On mobile you can’t have the parent item open a drop-down on click and go to the link on click, on mobile there is not hover action.
    If you would like to change the parent item name try this solution, if you are not sure how to adjust the code for your site please like yo your site and tell us what new name you wish to use so we can help.
    Most often people find using the standard Clone title is fine.

    Best regards,
    Mike

    #1397421

    Hi,
    i try u example code, but it not work. I want the change the Text “EXKLUSIVMARKEN” in the mobile menu in “ALLE EXKLUSIVMARKEN”. i put this in code in my funktion php:
    ———————————————
    function replace_burger_menu_parent_cloned_menu_item_text() { ?>
    <script>
    window.addEventListener(‘DOMContentLoaded’, function() {
    (function($){
    $(‘.avia_mobile’).on(‘click’, ‘.av-burger-menu-main’, function() {
    $(‘.menu-item-8843 .avia-menu-text:first’).text(function(index, text) {
    return text.replace(‘EXKLUSIVMARKEN’, ‘ALLE EXKLUSIVMARKEN’);
    });
    });
    }(jQuery));
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘replace_burger_menu_parent_cloned_menu_item_text’);

    #1397451

    Hi,
    Thanks for the feedback I tested this function and it seems to work, please include an admin login in the Private Content area so I can test in your site, perhaps the quotes became curly quotes in your functions.php

    function replace_burger_menu_parent_cloned_menu_item_text() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){ 
      $('.avia_mobile').on('click', '.av-burger-menu-main', function() {
      $('.menu-item-8843 .avia-menu-text:first').text(function(index, text) {
        	return text.replace('EXKLUSIVMARKEN', 'ALLE EXKLUSIVMARKEN');
    	});
      });
    }(jQuery));
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'replace_burger_menu_parent_cloned_menu_item_text');

    Best regards,
    Mike

    #1397520

    Thank you. Yes it works but not the way I need it. I need “Exklusivmaken” as the first link at the top and then “All Exklusivmarken” as the first link in the submenu. Exactly the opposite of how it is now.

    #1397550

    Hi,
    Thanks for the feedback, but it looks like you have already modified the script to change the second one, I see this on your site now:

    (function($){
        $('.avia_mobile').on('click', '.av-burger-menu-main', function() {
            $('.menu-item-8843 .sub-menu .avia-menu-text:first').text(function(index, text) {
                return text.replace(/(ALLE )?EXKLUSIVMARKEN/, 'ALLE EXKLUSIVMARKEN');
            });
        });
    }(jQuery));

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.