| Server IP : 162.214.74.102 / Your IP : 216.73.216.139 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_projetos/sopizzas/build/aui-scrollspy/ |
Upload File : |
YUI.add("aui-scrollspy",function(e,t){var n=e.getClassName,r=e.Lang,i="activate";e.Scrollspy=e.Base.create("scrollspy",e.Base,[],{activeLink:null,cachedLinks:null,initializer:function(){var t=this.get("scrollNode");this.publish(i,{defaultFn:this._defActivateEventFn}),t.on("scroll",e.bind(this._onScroll,this)),this.refresh()},clearCachedLinks:function(){this.cachedLinks=null},refresh:function(){var e=this._findLinkBestMatch();if(e===this.activeLink||!e&&!this.activeLink)return;this.fire(i,{newVal:e,prevVal:this.activeLink})},_defActivateEventFn:function(e){this._uiSetLink(e.newVal,e.prevVal)},_findLinkBestMatch:function(){var t=this._getValidLinks();return t.filter(e.bind(this._isLinkInViewport,this)).pop()},_getValidLinks:function(){return this.cachedLinks||(this.cachedLinks=this.get("target").all("a")),this.cachedLinks=this.cachedLinks.filter(function(e){return e.hash&&e.hash.length>1}),this.cachedLinks},_isLinkInViewport:function(t){var n=this.get("offset"),r=this.get("scrollNode"),i,s=e.one(t.hash);return r.compareTo(e.config.win)||r.compareTo(e.config.doc)?i=r.get("scrollTop"):i=r.getY(),s&&i>=s.getY()-n},_onScroll:function(){this.refresh()},_uiSetLink:function(t,n){var r=this.get("activeGroup"),i=this.get("activeClass");n||this._getValidLinks().filter(function(t){return e.one(t).ancestors(r).removeClass(i)}),n&&(n.ancestors(r).removeClass(i),this.activeLink=null),t&&(t.ancestors(r).addClass(i),this.activeLink=t)}},{ATTRS:{activeGroup:{validator:r.isString,value:"li, .dropdown"},activeClass:{validator:r.isString,value:n("active")},offset:{validator:r.isNumber,value:10},scrollNode:{setter:e.one,value:e.config.win,writeOnce:"initOnly"},target:{setter:e.one,writeOnce:"initOnly"}}})},"3.0.1",{requires:["base-build","node-screen","aui-classnamemanager"]});