From: Laury GvR Date: Tue, 19 Feb 2019 19:07:47 +0000 (-0500) Subject: Only disable top-level items in off-canvas if their child UL has 'children' class X-Git-Tag: v1.0.0^2~64 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=a6fc36a13b8ad631e1fdef8f1ce4f8663758e65d;p=WP-Themes%2Fuptravel.git Only disable top-level items in off-canvas if their child UL has 'children' class --- diff --git a/js/app.js b/js/app.js index 33d89d3..ffbfba2 100644 --- a/js/app.js +++ b/js/app.js @@ -45,7 +45,7 @@ var g=a(f(this.selector(c),a("
").html(c.attr("title")).html())),h=thi menuThis.on("click", function(){ other_menu = $(this).closest('ul.sub-menu-section').siblings('ul.sub-menu-section').not(".oc-home-link"); }) - if( $(this).children('ul').length > 0 ){ + if( $(this).children('ul.children').length > 0 ){ let menuParent = $(this).parent(); $(this).on("click", function(e){ if( $(this).parent().hasClass('sub-menu-section') ){ diff --git a/js/custom/offCanvas.js b/js/custom/offCanvas.js index b4d16e9..3c88223 100644 --- a/js/custom/offCanvas.js +++ b/js/custom/offCanvas.js @@ -15,7 +15,7 @@ jQuery(function($){ menuThis.on("click", function(){ other_menu = $(this).closest('ul.sub-menu-section').siblings('ul.sub-menu-section').not(".oc-home-link"); }) - if( $(this).children('ul').length > 0 ){ + if( $(this).children('ul.children').length > 0 ){ let menuParent = $(this).parent(); $(this).on("click", function(e){ if( $(this).parent().hasClass('sub-menu-section') ){