| Server IP : 194.61.116.167 / Your IP : 216.73.217.84 Web Server : Apache/2 System : Linux nimbus2000.evosiber.com 5.14.0-503.11.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 12 09:26:13 EST 2024 x86_64 User : evoplastik ( 1130) PHP Version : 8.1.34 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/evoplastik/public_html/wp-content/themes/mesmerize/assets/js/ |
Upload File : |
(function () {
window.mesmerizeMenuSticky = function() {
var $ = jQuery;
var dataprefix = "data-sticky";
function attrName(name) {
return name ? dataprefix + "-" + name : dataprefix;
}
var stickyElements = $('[' + dataprefix + ']');
stickyElements.each(function (index, el) {
var $el = $(el);
if ($el.data('stickData')) {
return;
}
var distance = parseInt($el.attr(attrName()));
var stickyOnMobile = $el.attr(attrName("mobile")) == "1";
var stickyOnTablet = true; //$el.attr(attrName("tablet")) == "1" ;
var useShrink = $el.attr(attrName("shrinked")) == "1";
var toBottom = $el.attr(attrName("to")) == "bottom";
var always = $el.attr(attrName("always")) == "1";
if (always) {
$el.addClass("fixto-fixed");
}
if (useShrink) {
$el.attr(attrName(), "initial");
}
var stickData = {
center: true,
responsiveWidth: true,
zIndex: (10000 + index),
topSpacing: distance,
stickyOnMobile: stickyOnMobile,
stickyOnTablet: stickyOnTablet,
useShrink: useShrink,
toBottom: toBottom,
useNativeSticky: false,
always: always
}
if (useShrink) {
return;
}
if (distance === 0 && jQuery('#wpadminbar').length && jQuery('#wpadminbar').css('position') === "absolute") {
distance = 0;
}
stickData['topSpacing'] = distance;
stickData['top'] = distance;
$el.data('stickData', stickData);
$el.fixTo('body', stickData);
});
var resizeCallback = function () {
var stickyElements = this.$els;
if (window.innerWidth < 1024) {
stickyElements.each(function (index, el) {
var data = $(this).data();
var stickData = data.stickData;
if (!stickData) {
return;
}
var fixToInstance = data.fixtoInstance;
if (!fixToInstance)
return true;
if (window.innerWidth <= 767) {
if (!stickData.stickyOnMobile) {
fixToInstance.stop();
}
} else {
if (!stickData.stickyOnTablet) {
fixToInstance.stop();
}
}
});
} else {
stickyElements.each(function (index, el) {
var data = $(this).data();
if (!data) {
return;
}
var fixToInstance = data.fixtoInstance;
if (!fixToInstance)
return true;
fixToInstance.start();
})
}
}
.bind({
"$els": stickyElements
});
$(window).bind('resize.sticky orientationchange.sticky', function () {
setTimeout(resizeCallback, 50);
});
$(window).trigger('resize.sticky');
}
jQuery(document).ready(function ($) {
mesmerizeMenuSticky();
});
})();