Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
878 B
2
Indexable
Never
if (window.matchMedia('(min-width: 992px)').matches) {
  $('.we-mega-menu-li .group-two-link').hover(

    function () {
      $(this).addClass('hover-submenu');
      var alturaElemento = $('.hover-submenu > .we-mega-menu-submenu').height();
      var alturaElemento2 = $('#block-axway2020-menumain-2 .group-two .we-mega-menu-col .nav-tabs').height();

      if (alturaElemento2 > alturaElemento) {
        var alturaElemento = $('#block-axway2020-menumain-2 .group-two .we-mega-menu-col .nav-tabs').height();
      }
      
      $('.we-mega-menu-submenu-inner').css({
        'min-height': alturaElemento,
        'height': alturaElemento
      });
    },
    function () {
      $(this).removeClass('hover-submenu');
      $('.we-mega-menu-submenu-inner').css({
        'min-height': 'initial',
        'height': 'initial'
      });
    }
  );
  
}
Leave a Comment