From: Anthony Talarico Date: Thu, 11 Oct 2018 17:35:32 +0000 (-0400) Subject: fixing clickable issues with the nav bar X-Git-Tag: v1.0.0^2~17 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=34bfa2395f4a8609a695c510ffbb83cf7827d68b;p=WP-Themes%2Flakesideclub.git fixing clickable issues with the nav bar --- diff --git a/js/app.js b/js/app.js index fbbcd24..4be7a9c 100644 --- a/js/app.js +++ b/js/app.js @@ -48,10 +48,7 @@ $(document).ready(function () { $(window).on("scroll", scrolled); var main_nav_top_level = $('.top-bar-section').children('ul').children('li.menu-item-has-children'); - var main_nav_top_level_no_children = $('.top-bar-section').children('ul').children('li:not(.menu-item-has-children)'); - main_nav_top_level_no_children.find('> a').on("click", function(event){ - event.preventDefault(); - }); + main_nav_top_level.each(function() { $(this).on("click", function(event){ var parentId = $(this).attr("id"); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 8c12837..613e7f0 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -39,10 +39,7 @@ $(document).ready(function () { $(window).on("scroll", scrolled); var main_nav_top_level = $('.top-bar-section').children('ul').children('li.menu-item-has-children'); - var main_nav_top_level_no_children = $('.top-bar-section').children('ul').children('li:not(.menu-item-has-children)'); - main_nav_top_level_no_children.find('> a').on("click", function(event){ - event.preventDefault(); - }); + main_nav_top_level.each(function() { $(this).on("click", function(event){ var parentId = $(this).attr("id");