From efbe54b39936bc9e07b64d076061ec23413c21a7 Mon Sep 17 00:00:00 2001 From: Alexandra Campbell Date: Mon, 14 Aug 2017 15:01:17 -0400 Subject: [PATCH] Fixed nested UL accordion functionality --- libraries/superfish/sfsmallscreen.js | 5 +++- libraries/superfish/style/ccad/css/ccad.css | 33 +++++++++++++++++---------- libraries/superfish/style/ccad/sass/ccad.scss | 12 ++++++++-- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/libraries/superfish/sfsmallscreen.js b/libraries/superfish/sfsmallscreen.js index 9765fed..f5722a9 100644 --- a/libraries/superfish/sfsmallscreen.js +++ b/libraries/superfish/sfsmallscreen.js @@ -136,7 +136,10 @@ $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion'); }); // Doing the same and making sure all the sub-menus are off-screen (hidden). - accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); + accordion.find('ul').each(function(){ + $(this).removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); + }); + // accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); // Creating the accordion toggle switch. var toggle = '
' + options.title + '
'; diff --git a/libraries/superfish/style/ccad/css/ccad.css b/libraries/superfish/style/ccad/css/ccad.css index 3dbea9d..bdb7869 100644 --- a/libraries/superfish/style/ccad/css/ccad.css +++ b/libraries/superfish/style/ccad/css/ccad.css @@ -3,32 +3,41 @@ * **/ /* line 25, ../sass/ccad.scss */ +.nolink { + pointer-events: none; } + +/* line 29, ../sass/ccad.scss */ +.sf-depth-1.menuparent { + text-decoration: none; } + +/* line 33, ../sass/ccad.scss */ .sf-style-ccad { /** small screen styles **/ - /** mega menu styles **/ } - /* line 27, ../sass/ccad.scss */ - .sf-style-ccad.sf-accordion-toggle { - display: none; } - /* line 31, ../sass/ccad.scss */ - .sf-style-ccad.sf-accordion { + /** &.sf-accordion-toggle{ + display: none; + } + + &.sf-accordion{ display: block !important; position: relative !important; left: auto; top: auto; height: auto !important; - width: 100% !important; } - /* line 41, ../sass/ccad.scss */ + width: 100% !important; + }**/ + /** mega menu styles **/ } + /* line 49, ../sass/ccad.scss */ .sf-style-ccad .sf-multicolumn { background: #f4f4f5; } - /* line 44, ../sass/ccad.scss */ + /* line 52, ../sass/ccad.scss */ .sf-style-ccad .sf-multicolumn a { color: black; } - /* line 46, ../sass/ccad.scss */ + /* line 54, ../sass/ccad.scss */ .sf-style-ccad .sf-multicolumn a:hover { background: #C8102E; } - /* line 48, ../sass/ccad.scss */ + /* line 56, ../sass/ccad.scss */ .sf-style-ccad .sf-multicolumn a.is-active { background: #DB3EB1; } - /* line 52, ../sass/ccad.scss */ + /* line 60, ../sass/ccad.scss */ .sf-style-ccad .sf-multicolumn-column { white-space: nowrap; } diff --git a/libraries/superfish/style/ccad/sass/ccad.scss b/libraries/superfish/style/ccad/sass/ccad.scss index dc1095e..dcecf41 100644 --- a/libraries/superfish/style/ccad/sass/ccad.scss +++ b/libraries/superfish/style/ccad/sass/ccad.scss @@ -22,9 +22,17 @@ $ccad-brand-lightgray: #C8C9C7; $ccad-brand-medgray: #97999B; $ccad-brand-darkgray: #75787B; +.nolink{ + pointer-events: none; +} + +.sf-depth-1.menuparent{ + text-decoration: none; +} + .sf-style-ccad { /** small screen styles **/ - &.sf-accordion-toggle{ + /** &.sf-accordion-toggle{ display: none; } @@ -35,7 +43,7 @@ $ccad-brand-darkgray: #75787B; top: auto; height: auto !important; width: 100% !important; - } + }**/ /** mega menu styles **/ .sf-multicolumn { -- 2.10.1.windows.1