jQuery Responsive Menu removing CSS backgrounds

For some reason whenever you click the last sub-menu drop down button on “Contact”, it causes all the menu li backgrounds to disappear. Anyone have any idea what’s going on. This is so weird.

The website is http://morevent.alliancemediahouston.com

Read More

and the responsive menu will come up when your screen is resized passed 768px.

Thanks for your help.

jQuery(function( $ ){

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

	$(".responsive-menu-icon").click(function(){
		$(this).next("header .genesis-nav-menu, .nav-primary .genesis-nav-menu").slideToggle();
	});

	$(window).resize(function(){
		if(window.innerWidth > 768) {
			$("header .genesis-nav-menu, .nav-primary .genesis-nav-menu, nav .sub-menu").removeAttr("style");
			$(".responsive-menu > .menu-item").removeClass("menu-open");
		}
	});

	$(".responsive-menu > .menu-item").click(function(event){
		if (event.target !== this)
		return;
			$(this).find(".sub-menu:first").slideToggle(function() {
			$(this).parent().toggleClass("menu-open");
		});
	});

});

Related posts

1 comment

  1. remove this class from last menu li tag

    menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-1771 current_page_item menu-item-has-children menu-item-1773
    

    to

    current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-has-children
    

Comments are closed.