Hi –
I’m trying to trigger the page hover on the .menu-wrapper vs. the .secondary-menu-wrapper. I tried swapping out the instances of .secondary-menu-wrapper with .menu-wrapper in theme.js below but it doesn’t seem to trigger it. Am I missing something?
secondaryMenu: function() {
$('.et-secondary-visibility-on_click').on('click', '.secondary-title', function() {
secondaryShowHide();
});
$('.et-secondary-visibility-on_hover.et-secondary-darkerning-on').on('mouseover', '.secondary-menu-wrapper', function() {
secondaryShow();
});
$('.et-secondary-visibility-on_hover.et-secondary-darkerning-on').on('mouseleave', '.secondary-menu-wrapper', function() {
secondaryHide();
});
var secondaryShowHide = function() {
if($('body').hasClass('et-secondary-shown')) {
secondaryHide();
} else {
secondaryShow();
}
};
var secondaryShow = function () {
$('body').addClass('et-secondary-shown');
}
var secondaryHide = function () {
$('body').removeClass('et-secondary-shown');
}
$(document).on('click touchstart', function(event) {
if( !$(event.target).closest('.secondary-menu-wrapper').length ) {
if($('body').hasClass('et-secondary-shown')) {
$('body').removeClass('et-secondary-shown');
}
}
})
},