Redtail Redtail - 7 months ago 51
Javascript Question

Responsive menu not closing on item selection

EDIT: I'm not trying to be pushy but if someone knows how to help me with this, I'd really appreciate it. is the site I'm working on, the issue I'm having is with the responsive menu not closing after a menu or submenu item is chosen. Ive been told the place to make the change needed is in global.js which I've included here in its current state. Could someone show me how to fix the issue?

jQuery(function( $ ){


$('.footer-widgets').prop('id', 'footer-widgets');

$(".nav-primary .genesis-nav-menu, .nav-secondary .genesis-nav-menu").addClass("responsive-menu").before('<div class="responsive-menu-icon"></div>');

$(this).next(".nav-primary .genesis-nav-menu, .nav-secondary .genesis-nav-menu").slideToggle();

if(window.innerWidth > 800) {
$(".nav-primary .genesis-nav-menu, .nav-secondary .genesis-nav-menu, nav .sub-menu").removeAttr("style");
$(".responsive-menu > .menu-item").removeClass("menu-open");

$(".responsive-menu > .menu-item").click(function(event){
if ( !== this)
$(this).find(".sub-menu:first").slideToggle(function() {

// Local Scroll Speed
duration: 750

// Sticky Navigation
var headerHeight = $('.site-header').innerHeight();
var beforeheaderHeight = $('.before-header').outerHeight();
var abovenavHeight = headerHeight + beforeheaderHeight - 1;


if ($(document).scrollTop() > abovenavHeight){


} else {






You can slide up the menu again on clicking any of the menu items. Try adding this bit of jquery:

$('.menu-item a').click(function () {
    $('.responsive-menu').stop(true, true).slideUp();