adding toggle functionality to the off canvas menu item as well as the toggle
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 22 Aug 2018 18:19:54 +0000 (14:19 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 22 Aug 2018 18:19:54 +0000 (14:19 -0400)
js/app.js
js/custom/pageSetup.js

index d9c7397..fc8a6f7 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -14,10 +14,15 @@ $(document).ready(function () {
     $('ul.children').each(function () {
         $(this).before('<a class="toggle" href="#"></a>');
     });
-    $('a.toggle').click('click', function () {
+    $('a.toggle').click('click', function (e) {
         $(this).toggleClass('open');
         $(this).siblings('ul').toggleClass('open');
     });
+    $('.left-off-canvas-list').find('.menu-item-has-children').on("click", function(e){
+        e.preventDefault();
+        $(this).children('a.toggle').toggleClass('open');
+        $(this).children('ul').toggleClass('open');
+    })
     // Custom js and jquery for staffords ///////////////////
     // reservation for toggle click function ///////////////
     $("#res-tab a").on('click', function () {
index 399bdda..ee9acb2 100644 (file)
@@ -5,10 +5,15 @@ $(document).ready(function () {
     $('ul.children').each(function () {
         $(this).before('<a class="toggle" href="#"></a>');
     });
-    $('a.toggle').click('click', function () {
+    $('a.toggle').click('click', function (e) {
         $(this).toggleClass('open');
         $(this).siblings('ul').toggleClass('open');
     });
+    $('.left-off-canvas-list').find('.menu-item-has-children').on("click", function(e){
+        e.preventDefault();
+        $(this).children('a.toggle').toggleClass('open');
+        $(this).children('ul').toggleClass('open');
+    })
     // Custom js and jquery for staffords ///////////////////
     // reservation for toggle click function ///////////////
     $("#res-tab a").on('click', function () {