| Server IP : 43.153.74.48 / Your IP : 216.73.216.28 Web Server : LiteSpeed System : Linux VM-0-13-ubuntu 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 User : www ( 1002) PHP Version : 8.1.29 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/stainlesstint.com/wp-content/themes/woodmart/js/scripts/menu/ |
Upload File : |
/* global xts_settings */
(function($) {
woodmartThemeModule.menuOverlay = function() {
var hoverSelector = '.wd-header-nav.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-hover, .wd-header-cats.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-hover, .wd-sticky-nav:not(.wd-opened), .wd-header-cats.wd-with-overlay.wd-event-hover, .wd-header-my-account.wd-with-overlay, .wd-header-cart.wd-with-overlay, .wd-header-search.wd-display-dropdown.wd-with-overlay';
var sideClasses;
woodmartThemeModule.$document.on('mouseleave', hoverSelector, function() {
if ( $(this).parents('.wd-header-cats.wd-with-overlay.wd-event-click.wd-opened').length ) {
return;
}
$('.wd-close-side').attr('class', sideClasses);
});
woodmartThemeModule.$document.on('mouseenter mousemove', hoverSelector, function() {
var $this = $(this);
var $overlay = $('.wd-close-side');
if ($overlay.hasClass('wd-close-side-opened') || $('html').hasClass('platform-iOS')) {
return;
}
var isInHeader = $this.parents('.whb-header').length;
var isInCloneHeader = $this.parents('.whb-clone').length;
var isInCategories = $this.hasClass('wd-sticky-nav');
var isInHeaderCategories = $this.parents('.wd-header-cats').length;
sideClasses = $overlay.attr('class');
if (isInHeader) {
if ($this.parents('.whb-sticked').length) {
$overlay.addClass('wd-location-header-sticky');
} else {
$overlay.addClass('wd-location-header');
}
if (isInHeaderCategories) {
$overlay.addClass('wd-location-header-cats');
}
} else if (isInCloneHeader) {
$overlay.addClass('wd-location-header-sticky');
} else if (isInCategories) {
$overlay.addClass('wd-location-sticky-nav');
}
$overlay.addClass('wd-close-side-opened');
});
woodmartThemeModule.$document.on('click', '.wd-header-nav.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-click, .wd-header-cats.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-click, .wd-header-cats.wd-with-overlay.wd-event-click', function() {
var $side = $('.wd-close-side');
var $item = $(this);
if ( $item.hasClass('wd-opened') && $side.hasClass('wd-close-side-opened') ) {
return;
}
if ( $item.parents('.wd-header-cats.wd-with-overlay.wd-event-click.wd-opened').length || $item.parents('.wd-header-cats.wd-with-overlay.wd-event-hover').length ) {
return;
}
$side.toggleClass('wd-close-side-opened').toggleClass('wd-location-header');
});
woodmartThemeModule.$document.on('click touchstart', '.wd-close-side.wd-location-header', function() {
$(this).removeClass('wd-location-header');
});
};
$(document).ready(function() {
woodmartThemeModule.menuOverlay();
});
})(jQuery);