From 34bfa2395f4a8609a695c510ffbb83cf7827d68b Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 11 Oct 2018 13:35:32 -0400 Subject: [PATCH] fixing clickable issues with the nav bar --- js/app.js | 5 +---- js/custom/pageSetup.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) 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"); -- 2.17.1