Mobile Menu disappears on every page but Homepage?

Community Forums Forums Design Tips and Tricks Mobile Menu disappears on every page but Homepage?

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  benjeeno 9 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #93271

    benjeeno
    Participant
    Post count: 266

    WP 3.8.1
    Winning Agent Pro

    I swapped out the mobile menu that came with Winning Agent with Brad Potter’s mobile menu and it shows on the Homepage but won’t show on any other page/post. I’ve used Potter’s mobile menu in Agency Pro with no issue at all. What is going on here? I’ve poked around my CSS and can’t seem to find anything or figure out what is missing in CSS. Or maybe it’s something else?

    http://coronadoislandrealtors.com/development/
    #93277

    benjeeno
    Participant
    Post count: 266
    
    jQuery(document).ready(function($) {
    
      $("#menu-header-navigation").before('<div id="header-menu-icon"></div>');
    	$("#header-menu-icon").click(function() {
    		$("#menu-header-navigation").slideToggle();
    	});
    	$(window).resize(function(){
    		if(window.innerWidth > 1139) {
    			$("#menu-header-navigation").removeAttr("style");
    		}
    	});
    	
    });
    

    The div #header-menu-icon isn’t inserting before #menu-header-navigation on any of the site’s pages except the Homepage.
    It’s like this on the homepage:

    
    <nav class="">
    <div id="#header-menu-icon"></div>
    <ul id="#menu-header-navigation"></div>
    </nav>
    

    And like this on every other page:

    
    <nav class="">
    <ul id="#menu-header-navigation"></div>
    </nav>
    

    The menu is there it just doesn’t display because it is set to display:none for the div #header-menu-icon to reveal the menu. If you comment out display:none for that ID the menu will show on all pages, but the #header-menu-icon div isn’t there to toggle it to close, or open when it’s set to display:none.

    You could rename this div #header-menu-icon almost anything, like “hubeflube” and it won’t insert, so I don’t think it’s a conflict of IDs.

    Why isn’t the #header-menu-icon div not inserting for all of the other pages?
    Have any suggestions on what to try?

    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
    • This reply was modified 9 months, 3 weeks ago by  benjeeno.
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.