- This topic has 13 replies, 4 voices, and was last updated 8 years, 10 months ago by andrewf90.
-
AuthorPosts
-
January 15, 2016 at 11:14 pm #82970BRIVETTMember
My site is : http://www.hummingbirdconsulting.co.uk/
When the browser is scaled down or it is accessed on a mobile device, the top bar menu disappears and is replaced with the three bar mobile menu.
All good except nothing happens when you click on it.
Any ideas what might be wrong ?
Cheers
BarryJanuary 16, 2016 at 8:07 am #82988PratikParticipantHi @BRIVETT,
I think there is some error with your site. The footer is not being shown, and the page is being cut off prematurely. Have you made any code changes?
Regards,
PratikJanuary 16, 2016 at 2:22 pm #82997BRIVETTMemberHi Praktik
Many thanks for this.
I had commented out do_action( ‘catchflames_footer’ ); ?> in footer.php to try and supress the footer line.
If I put it back, it all works again…
It’s back 🙂
Thanks for the pointer.
Cheers
BarryJanuary 17, 2016 at 10:50 am #83051PratikParticipantHi BRIVETT,
Glad everything worked out. If you liked our theme and support, please leave a review at here.
Thanks,
PratikJanuary 25, 2016 at 10:21 pm #83731drejecMemberI have the same problem with my site.. Plase, help.
January 26, 2016 at 10:08 am #83750PratikParticipantHi @drejec,
Please post in a separate(Catch Responsive) topic post as your theme is different.
Regards,
PratikJanuary 27, 2016 at 1:01 pm #83868andrewf90MemberHey, I noticed I have the same problem as well. My site is: http://goo.gl/49Mbeo. I thought it was just me. You have to refresh the page and then it would work? The code change I’ve made was a javascript code so that the child menu items in the mobile site would auto-collapse. Is there a piece of code I could add to auto-refresh the page when someone changes the screen size from mobile site to desktop site by chance?
January 27, 2016 at 3:27 pm #83876PratikParticipantHi @andrewf90,
I checked your site and the mobile menu is working fine.January 27, 2016 at 9:42 pm #83891andrewf90MemberHi, Pratik!
Sorry, I know I didn’t explain myself clearly. Here’s an image: http://snag.gy/2Faf7.jpg. I can’t click on ‘Business Categories.’ When I click on it, the box changes to grey, but no sub-menu items appear.
This happens when on the computer when I widen the browser window from mobile site to desktop site, the desktop site menu buttons become unclickable. I have to refresh the page for the menu buttons to be clickable again.
Sorry if I’m still unclear.
January 27, 2016 at 10:41 pm #83893andrewf90MemberOkay, it’s weird. Now it’s like the mobile nav menu becomes unclickable sometimes, too. If you switch from mobile to desktop and from desktop to mobile, you should be able to see what I see. If it doesn’t happen the first time, you can try a couple times, and it should definitely happen. I’m pulling my hair right now. lol.
Thanks again.
January 28, 2016 at 12:36 pm #83935PratikParticipantHi andrewf90,
That sort of problem should not be there when viewing on mobile or desktop independently. We make our themes responsive via CSS so adding custom Scripts on top of that may not be a good solution. However, by the problem you describe it is because of script firing only once while loading. You should wrap your script in a resize event, so that the when you resize the window, that script is fired. I have given you an idea but to implement it, you should hire a customizer with proper JavaScript/jQuery knowledge. This falls outside our theme scope.
Also, your site is in Coming Soon mode again, so its pretty impossible to look at.
January 28, 2016 at 12:39 pm #83939andrewf90MemberSorry, Pratik!
I just realized that. I was working on a page. I took off the ‘Coming Soon’ page. Sorry! This was the code I received, which might be helpful for others:
/* Your code goes here */ var $ = jQuery, breakpoint = 940, initClass = 'toggleSubnavInitiated', menu, parentLinks, childrenItems; $(document).ready(function() { menu = $('.menu'); parentLinks = menu.find('.menu-item-has-children > a'); childrenItems = menu.find('.sub-menu'); if ($(window).width() <= breakpoint) { toggleSubnav(menu, parentLinks, childrenItems); } }); $(window).resize(function() { if ($(window).width() <= breakpoint) { toggleSubnav(menu, parentLinks, childrenItems); } }); function toggleSubnav(menu, parentLinks, childrenItems) { if (parentLinks.length !== 0) { menu.addClass(initClass); childrenItems.hide(); parentLinks.on('click', function(event) { event.preventDefault(); $(this).siblings('.sub-menu').toggle(); }); } }
When you say wrap the script in a resize event, that sounds like that problem I’m having. Would you be able to tell me how I can wrap this code in a resize event?
Thanks again, mate! 😛
January 28, 2016 at 1:33 pm #83950PratikParticipantHi @andrew90,
I am very sorry but providing support for this script falls outside the theme support. I hope you understand.
Regards,
PratikJanuary 29, 2016 at 2:42 am #84005andrewf90MemberYeah, I do. I thought I would at least try. lol. Thanks for all your help already!
-
AuthorPosts
- The topic ‘Responsive mobile menu not working’ is closed to new replies.