Avada Forums Community Forum Mobile Menu (How to make Main Menu Item toggle to Sub-Menu Item?) Reply To: Mobile Menu (How to make Main Menu Item toggle to Sub-Menu Item?)

nineteenineteen
Participant
Post count: 1

Hi all,

You could try to use this code, inserting it here: Avada> Options> Advanced> Code Fields (Tracking etc.)> Insert the code here “Space before </body>”

<script>
var opened = false;
jQuery(document).ready(function($){
  $(".fusion-mobile-nav-item.menu-item-has-children").click(function(){
    if(opened == false){
        $(this).children(".sub-menu").show();
        opened = true;
    }else{
        $(this).children(".sub-menu").hide();
        opened = false;
    }
  });
});    
</script>

You will probably need to customize the sub-menu styles …

I hope it will help you.