detectmobilebrowser.js
7 years ago
iris-script.js
6 years ago
mystickymenu-admin.js
6 years ago
mystickymenu.js
6 years ago
mystickymenu.min.js
6 years ago
select2.min.js
6 years ago
mystickymenu.js
1 lines
| 1 | !function(e){"use strict";jQuery(document).ready(function(e){if(jQuery.browser.mobile&&!option.device_mobile)return!1;if(!jQuery.browser.mobile&&!option.device_desktop)return!1;if(e(option.mystickyClass)[0]){var t,i=document.querySelector(option.mystickyClass),o=parseInt(option.disableWidth),s=parseInt(option.disableLargeWidth),n=option.mystickyTransition,d=parseInt(option.activationHeight),a=option.adminBar,r=option.mysticky_disable_down;C();for(var l=i.parentNode,c=document.createElement("div"),m=0,p=0;p<l.childNodes.length;p++)if(l.childNodes[p]==i){m=p;break}c.id="mysticky-wrap",c.appendChild(i),l.insertBefore(c,l.childNodes[m]);var y,f,u=i.parentNode,w=document.createElement("div");if(w.id="mysticky-nav",u.replaceChild(w,i),w.appendChild(i),"0"==d)var h=!0;E(),j();var v,x=0;B(),Q();var k=d;S(),H();var g="scrollY"in window,L=0;document.addEventListener("scroll",function(a){var l=e(".mysticky-welcomebar-fixed").css("top"),m=e(".mysticky-welcomebar-fixed").data("position"),p=e(".mysticky-welcomebar-fixed").data("height");if(e(".mysticky-welcomebar-fixed").length&&parseInt(l)>=0&&"top"==m)var u=p;else u="";if(t>=o&&(0==s||t<=s)){var h=g?window.scrollY:document.documentElement.scrollTop;if(0==document.documentElement.scrollTop&&w.classList.remove("wrapfixed"),0<=h){if(h>=L)h>=d&&i.classList.add("myfixed"),h>=d&&w.classList.add("wrapfixed"),h>=d&&(c.style.height=y+"px"),h>=d&&(i.style.width=v+"px"),"slide"==n&&("false"==r&&(w.style.top=h>=d+f-x?x+u+"px":"-"+f+"px"),y>f&&"false"==r&&(h<d+f&&(w.style.top="-"+y+"px"),h>=d+f&&(w.style.top=x+u+"px"))),w.classList.add("down"),w.classList.remove("up"),"on"==r&&(w.style.top="-"+(y+x)+"px",jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").hide());else{var b=g?window.scrollY:document.documentElement.scrollTop;!(b>k)&&(c.style.height=""),!(b>k)&&(i.style.width=""),"slide"==n?(!(b>k)&&i.classList.remove("myfixed"),!(b>k)&&w.classList.remove("wrapfixed"),"false"==r&&b<k+f+200-x&&(w.style.top="-"+f+"px")):(!(b>k)&&i.classList.remove("myfixed"),!(b>k)&&w.classList.remove("wrapfixed")),w.classList.remove("down"),w.classList.add("up"),"on"==r&&(w.style.top=x+u+"px",jQuery("#mysticky-nav "+option.mystickyClass).css("width",v+"px"),jQuery("#mysticky-nav "+option.mystickyClass+".elementor-sticky").show())}L=h}else w.classList.remove("up")}});var b=e(window).width();window.addEventListener("resize",I),window.addEventListener("orientationchange",I)}else console.log("myStickymenu: Entered Sticky Class does not exist, change it in Dashboard / Settings / myStickymenu / Sticky Class. ");function C(e){e=window;var i="inner";"innerWidth"in window||(i="client",e=document.documentElement||document.body),t=e[i+"Width"]}function E(){y=i.offsetHeight,parseInt(e(i).css("marginBottom"))>0&&(c.style.marginBottom=e(i).css("marginBottom")),"0"==y&&e(i).children().filter(":visible").each(function(){y=e(this).outerHeight(!0)})}function j(){i.classList.add("myfixed"),"0"==(f=e(".myfixed").outerHeight())&&e(".myfixed").children().filter(":visible").each(function(){f=e(this).outerHeight(!0)}),i.classList.remove("myfixed")}function B(){x="true"==a&&t>600&&e("#wpadminbar")[0]?e("#wpadminbar").height():0,w.style.top="slide"==n?"-"+f+"px":x+"px"}function Q(){var t=e(i)[0].getBoundingClientRect();v=t.width}function S(){1==h&&("slide"==n&&(d=e(i).offset().top+y-x,k=e(i).offset().top+y-x,"on"==r&&(k=e(i).offset().top-x)),"fade"==n&&("false"==r&&(d=e(i).offset().top-x,k=e(i).offset().top-x),"on"==r&&(d=e(i).offset().top-x+y,k=e(i).offset().top-x)))}function H(){1==h&&y>f&&("slide"==n?(k=d,"on"==r&&(k=d-f)):(d=y,k=y))}function I(){e(window).width()!=b&&(w.classList.remove("up"),w.classList.remove("down"),e(".wrapfixed")[0]||(E(),i.style.removeProperty("width"),Q()),C(),B(),j(),S(),H())}})}(); |