Responsive sticky menu

Homepage Community Forums inSync Theme Support Responsive sticky menu

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16624
    Rik
    Customer

      I am trying to create a responsive sticky (using secondary navigation) menu on my webpage and followed the steps in this tutorial. Its working quite good except for the responsive menu. To get it to work I think I’ll have to adjust the responsive-menu.js. I tried to do it myself but can’t get it to work. Can anyone help me? Am I forgetting something?

      #16625
      Andykev
      Customer

        Rik,
        Please post a link to your site so we can see what is going on. 馃檪

        #16631
        Rik
        Customer

          Hi Andy, At the moment I’m building my site on a local computer. The site should replace the live site. This is why I prefer to leave it on my local computer until it’s finished.

          #16632
          Rik
          Customer

            This is the code for the responsive primery menu:

            jQuery(function( $ ){
            
            	$("header .genesis-nav-menu, .nav-primary .genesis-nav-menu").addClass("responsive-menu").before('<div class="responsive-menu-icon"></div>');
            
            	$(".responsive-menu-icon").click(function(){
            		$(this).next("header .genesis-nav-menu, .nav-primary .genesis-nav-menu").slideToggle();
            	});
            
            	$(window).resize(function(){
            		if(window.innerWidth > 768) {
            			$("header .genesis-nav-menu, .nav-primary .genesis-nav-menu, nav .sub-menu").removeAttr("style");
            			$(".responsive-menu > .menu-item").removeClass("menu-open");
            		}
            	});
            
            	$(".responsive-menu > .menu-item").click(function(event){
            		if (event.target !== this)
            		return;
            			$(this).find(".sub-menu:first").slideToggle(function() {
            			$(this).parent().toggleClass("menu-open");
            		});
            	});
            
            });

            Can I just copy this file, refer to it in my functions file and replace nav-primery with nav-secondary?

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