From: Anthony Talarico Date: Thu, 1 Nov 2018 14:23:29 +0000 (-0400) Subject: moving the oc script code out of js so it can be tested without gulp X-Git-Tag: v1.0.0^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=3dc0ffa1ec68271a89dbff84e26b57273acd7518;p=WP-Themes%2Flakesideclub.git moving the oc script code out of js so it can be tested without gulp --- diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index c1a1b7e..b6f6648 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -51,14 +51,5 @@ $(document).ready(function () { }); }); - var main_nav_top_level_oc = $('.left-off-canvas-list').children('ul').children('li.menu-item-has-children'); - main_nav_top_level_oc.each(function() { - $(this).on("click", function(event){ - let isParent = $(event.target).parent().hasClass("oc_parent"); - if( isParent ){ - event.stopPropagation(); - event.preventDefault(); - } - }); - }); + }); diff --git a/parts/dropdown-map.php b/parts/dropdown-map.php index f7729ea..d66e265 100644 --- a/parts/dropdown-map.php +++ b/parts/dropdown-map.php @@ -138,5 +138,16 @@ // region_content.text(regions['regions']['content']); // region_link.attr("href", url); }); + + var main_nav_top_level_oc = $('.left-off-canvas-list').children('ul').children('li.menu-item-has-children'); + main_nav_top_level_oc.each(function() { + $(this).on("click", function(event){ + let isParent = $(event.target).parent().hasClass("oc_parent"); + if( isParent ){ + event.stopPropagation(); + event.preventDefault(); + } + }); + }); });