Skip to content

Commit

Permalink
Update magicmenu.js
Browse files Browse the repository at this point in the history
  • Loading branch information
magiccart committed Jul 13, 2021
1 parent aa344b7 commit d83af58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/frontend/web/js/magicmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ require(['jquery', 'easing'], function($, easing){
},

active: function (menu) {
var homeUrl = menu.find('li.home a').attr('href').replace(/\/$/, "");
var homeUrl = BASE_URL.replace(/\/$/, ""); /* Global variable BASE_URL from magento2 */
var currentUrl = window.location.href.replace(/\/$/, "");
if(homeUrl == currentUrl){
menu.find('li.home').addClass('active');
Expand All @@ -343,7 +343,7 @@ require(['jquery', 'easing'], function($, easing){

megamenu: function (menu) {
var isHorizontal = menu.hasClass('magicmenu');
// Topmenu
/* Topmenu */
var navDesktop = menu.find('.nav-desktop');
if(isHorizontal && navDesktop.hasClass('sticker')) methods.sticky(menu);
/* Active menu top-vmega */
Expand Down

0 comments on commit d83af58

Please sign in to comment.