Skip to content

Commit c92eba3

Browse files
Update javascript.js
1 parent b823c1e commit c92eba3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

javascript.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function MegaMenu(link, menu, menuClone, headerLinkTrigger, clickthrough, animat
1313
thisObj.menuClone = menuClone;
1414
thisObj.menu = menu;
1515
thisObj.trigger = headerLinkTrigger;
16-
thisObj.desktopMobileTrigger = $(`#header .header-display-mobile .header-nav [href="${link}"]`).closest('.header-nav-item'),
16+
thisObj.desktopMobileTrigger = $(`#header .header-display-mobile .header-nav [data-href="${link}"]`).closest('.header-nav-item'),
1717
thisObj.clickThrough = clickthrough;
1818
thisObj.animation = animation;
1919
thisObj.action = action;
@@ -40,7 +40,7 @@ function MegaMenu(link, menu, menuClone, headerLinkTrigger, clickthrough, animat
4040
$(thisObj.trigger).addClass('wm-mega-menu-trigger');
4141
$(thisObj.desktopMobileTrigger).addClass('wm-mega-menu-trigger');
4242

43-
$('[data-folder="root"].header-menu-nav-folder').find('a[href="' + thisObj.linkUrl + '"]').closest('.header-menu-nav-item').addClass('mobile-mega-trigger');
43+
$('[data-folder="root"].header-menu-nav-folder').find('button[data-href="' + thisObj.linkUrl + '"]').closest('.header-menu-nav-item').addClass('mobile-mega-trigger');
4444

4545
/*Add Menu to Mobile Folder*/
4646
if (thisObj.mobileType == 'section') {
@@ -213,7 +213,7 @@ $('[data-mega-menu]').each(function(){
213213
let link = $(this).attr('data-mega-menu'),
214214
menu = $(this).closest('#footer-sections .page-section'),
215215
menuClone = $(menu).clone().css('display', 'none'),
216-
headerLinkTrigger = $('#header a[href="' + link + '"]').closest('.header-nav-item').first(),
216+
headerLinkTrigger = $('#header button[data-href="' + link + '"]').closest('.header-nav-item').first(),
217217
mobileMenuType = $(this).attr('data-mobile-type') == 'section' ? 'section' : 'folder',
218218
action = typeof $(this).attr('data-action') == 'undefined' ? 'hover' : $(this).attr('data-action'),
219219
clickthrough = typeof $(this).attr('data-clickthrough') == "undefined" ? false : $(this).attr('data-clickthrough'),
@@ -238,7 +238,7 @@ if($('[data-mega-menu]').length) {
238238
let menuLink = $(this).attr('data-mega-menu');
239239
let clickThrough = $(this).attr('data-clickthrough');
240240
if (currentUrl == clickThrough) {
241-
$('#header .header-display-desktop .header-nav-wrapper [href="' + menuLink + '"]').closest('.wm-mega-menu-trigger').addClass('header-nav-item--active');
241+
$('#header .header-display-desktop .header-nav-wrapper [data-href="' + menuLink + '"]').closest('.wm-mega-menu-trigger').addClass('header-nav-item--active');
242242
}
243243
});
244244
})

0 commit comments

Comments
 (0)