mystickymenu.min.js
1 lines
| 1 | !function(e){"use strict";function t(e){var t=d.offsetHeight+"px",i=d.offsetWidth+"px",s=y?window.scrollY:document.documentElement.scrollTop;s>=m?d.classList.add("myfixed"):d.classList.remove("myfixed"),s>=m?l.classList.add("wrapfixed"):l.classList.remove("wrapfixed"),d.style.width=s>=m?i:"",n.style.height=s>=m?t:""}function i(){d.style.removeProperty("width"),d.classList.remove("myfixed"),l.classList.remove("wrapfixed"),n.style.removeProperty("width"),a.style.removeProperty("height")}var s=parseInt(mysticky_name.mysticky_disable_at_width_string);if(parseInt(document.body.clientWidth)>=s){for(var d=document.querySelector(mysticky_name.mysticky_string),r=d.parentNode,n=document.createElement("div"),o=0,c=0;c<r.childNodes.length;c++)if(r.childNodes[c]==d){o=c;break}n.id="mysticky-wrap",n.appendChild(d),r.insertBefore(n,r.childNodes[o]);var a=d.parentNode,l=document.createElement("div");l.id="mysticky-nav",a.replaceChild(l,d),l.appendChild(d);var m=parseInt(mysticky_name.mysticky_active_on_height_string),y="scrollY"in window;document.addEventListener("scroll",t),window.addEventListener("resize",i)}}(jQuery); |