Support » Theme: Responsive » Mobile menu js but

  • On line 433 of responsive-scripts.js, the previous value of var current is always overwritten, which causes the mobile menu to sometimes not display the current page beside the burger icon (for example, if you have a custom itme in the menu that links to a custom-post-type).

    There should be a check to only overwrite the value if the initial value is non-existent.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author CyberChimps

    (@cyberchimps)

    Hi,

    Thanks for sharing the details.
    Can you please share your site URL and let me know the page where this issue occurs? This will help me to better understand the problem.

    Thank you.

    squarestar

    (@squarestar)

    Hi – unfortunately the install is on a private internal server. However in the current version of the script you can see here:

    
    line 432	var current = $('.main-nav li.current-menu-item a').html();
    line 433	current = $('.main-nav li.current_page_item a').html();
    

    The initial value of current is immediately overwritten with no conditions, so it is redundant, even though actually has a value on front end pages that are ‘current’ but are not of the post-type page.

    In my case the problem is made evident by a custom link in the main menu. I have a custom post type of Daily Menu and a custom link to the archive page for that post type in the main menu whose value is /daily-menu/. On the front end, the li item for that link has the class current-menu-item, but none of the main menu list items have the class current_page_item, so when I land on that archive page on a mobile device, the title beside the burger menu is empty.

    Theme Author CyberChimps

    (@cyberchimps)

    Hi,

    On mobile screens, the title of the page is getting displayed in the navbar. I checked the issue on our test server but didn’t face any issue. The title is getting displayed in the navbar properly.

    Can you please share your site URL and let me know the page where this issue occurs? This will help me to check the issue and replicate it on our test server.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mobile menu js but’ is closed to new replies.