Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #82970
    BRIVETT
    Member

    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
    Barry

    #82988
    Pratik
    Keymaster

    Hi @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,
    Pratik

    #82997
    BRIVETT
    Member

    Hi 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
    Barry

    #83051
    Pratik
    Keymaster

    Hi BRIVETT,

    Glad everything worked out. If you liked our theme and support, please leave a review at here.

    Thanks,
    Pratik

    #83731
    drejec
    Member

    I have the same problem with my site.. Plase, help.

    http://www.singlca.si

    #83750
    Pratik
    Keymaster

    Hi @drejec,

    Please post in a separate(Catch Responsive) topic post as your theme is different.

    Regards,
    Pratik

    #83868
    andrewf90
    Member

    Hey, 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?

    #83876
    Pratik
    Keymaster

    Hi @andrewf90,
    I checked your site and the mobile menu is working fine.

    #83891
    andrewf90
    Member

    Hi, 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.

    #83893
    andrewf90
    Member

    Okay, 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.

    #83935
    Pratik
    Keymaster

    Hi 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.

    #83939
    andrewf90
    Member

    Sorry, 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! 😛

    #83950
    Pratik
    Keymaster

    Hi @andrew90,

    I am very sorry but providing support for this script falls outside the theme support. I hope you understand.

    Regards,
    Pratik

    #84005
    andrewf90
    Member

    Yeah, I do. I thought I would at least try. lol. Thanks for all your help already!

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Responsive mobile menu not working’ is closed to new replies.