From: Anthony Talarico Date: Wed, 22 Aug 2018 18:23:34 +0000 (-0400) Subject: moving js code around X-Git-Tag: v1.0.52^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6720f6712998202bed1e8cda5b1890e844b3e47d;p=WP-Themes%2Fstaffords.git moving js code around --- diff --git a/js/app.js b/js/app.js index fc8a6f7..9662e06 100644 --- a/js/app.js +++ b/js/app.js @@ -18,11 +18,7 @@ $(document).ready(function () { $(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 () { @@ -33,10 +29,14 @@ $(document).ready(function () { } }); if(window.glmData.location){ - console.log( $('a.toggle')) $('a.toggle').trigger("click"); $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right'); } + $('.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'); + }) var extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&', crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&', adults, diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index ee9acb2..839b41f 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -9,11 +9,7 @@ $(document).ready(function () { $(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 () { @@ -24,10 +20,14 @@ $(document).ready(function () { } }); if(window.glmData.location){ - console.log( $('a.toggle')) $('a.toggle').trigger("click"); $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right'); } + $('.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'); + }) var extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&', crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&', adults,