moving the oc script code out of js so it can be tested without gulp
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 1 Nov 2018 14:23:29 +0000 (10:23 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 1 Nov 2018 14:23:29 +0000 (10:23 -0400)
js/custom/pageSetup.js
parts/dropdown-map.php

index c1a1b7e..b6f6648 100644 (file)
@@ -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();
-            }
-        });
-    });
+    
 });
index f7729ea..d66e265 100644 (file)
             // 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();
+                }
+            });
+        });
     });
 </script>