Rik

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Responsive sticky menu #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?

      in reply to: Responsive sticky menu #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.

      Viewing 2 posts - 1 through 2 (of 2 total)