- This topic has 9 replies, 2 voices, and was last updated 6 years, 10 months ago by
Tom.
-
AuthorPosts
-
November 10, 2016 at 12:12 am #243154
Amos
Hello Tom. i have a secondary menu (Above header) it is possible to change it to below header only on mobile?
Thank You.November 10, 2016 at 9:33 am #243294Tom
Lead DeveloperLead DeveloperUnfortunately it’s really tough to move HTML elements around without using javascript which is pretty jumpy.
One solution might be to use the primary navigation as your mobile navigation and just hide it on desktop screens?
November 12, 2016 at 11:17 pm #243925Amos
I need 2 menu on desktop.i cant hide one of them.
desktop:primary nav – below header (slideout mobile) .secondery nav – above header
i want mobile will be – mobile header (primary) .secondery nav – below header.maybe if i am using mobile header i can add a text\image below the logo and the menu?
November 13, 2016 at 12:13 am #243929Tom
Lead DeveloperLead DeveloperI guess the only way to move the secondary navigation below the primary navigation/mobile header on mobile would be to use javascript.
It will be a little jumpy..
You would place this into the wp_footer hook in GP Hooks:
<script> jQuery(window).load(function($) { var mobile, widthTimer; mobile = jQuery( '.menu-toggle' ); function generateSecondaryCheckWidth() { if ( mobile.is( ':visible' ) ) { jQuery('#secondary-navigation').insertAfter('#site-navigation'); } else { jQuery('#secondary-navigation').insertBefore('.site-header'); } } if ( mobile.is( ':visible' ) ) { generateSecondaryCheckWidth(); } jQuery(window).resize(function() { clearTimeout(widthTimer); widthTimer = setTimeout(generateSecondaryCheckWidth, 100); }); }); </script>
Worth a shot 🙂
November 25, 2016 at 12:05 pm #247741Amos
Tom unfortunately i am still stuck! maybe there is an option on “mobile header” that the slideout will be not the menu beside the logo?
i want to use slidoout on the menu below the mobile header.November 25, 2016 at 8:31 pm #247868Tom
Lead DeveloperLead DeveloperI’m not too sure what you mean, but maybe this will help?:
@media (max-width: 768px) { .mobile-header-navigation .mobile-header-logo { float: none; text-align: center; } .mobile-header-logo .mobile-header-navigation .menu-toggle { float: none !important; display: block !important; text-align: center; width: 100%; } }
November 26, 2016 at 1:02 am #247904Amos
i am using mobile header (primary) and below header (secondary) i want the secondary will be the slideout menu.
November 26, 2016 at 10:13 am #248013Tom
Lead DeveloperLead DeveloperCan I see what you have so far?
November 26, 2016 at 10:54 am #248031Amos
Example :
http://22.idanweb.com/i choose the secondery menu to be the slideout.
but instead to slideout the menu below the header – it change the menu beside the header and now i have 2 secondary menu. instead one primary and one secondary.November 26, 2016 at 9:58 pm #248123Tom
Lead DeveloperLead DeveloperI guess I’m not understanding what you’re trying to achieve.
Do you want to remove the secondary navigation on mobile (no more grey bar)?
-
AuthorPosts
- You must be logged in to reply to this topic.