PageSourceSearch

https://www.members.gamsat-prep.com/assets/plugins/back-to-top.js

js gamsat-prep.com collected 2026-10-02 15:35:20 UTC 2,302 bytes, 24 lines download raw bytes

1var scrolltotop={setting:{startline:100,scrollto:0,scrollduration:1000,fadeduration:[500,100]},controlHTML:'',controlattrs:{offsetx:5,offsety:5},anchorkeyword:'#top',state:{isvisible:false,shouldvisible:false},scrollup:function(){if(!this.cssfixedsupport)this.$control.css({opacity:0})
2var dest=isNaN(this.setting.scrollto)?this.setting.scrollto:parseInt(this.setting.scrollto)
3if(typeof dest=="string"&&jQuery('#'+dest).length==1)dest=jQuery('#'+dest).offset().top
4else
5dest=0
6this.$body.animate({scrollTop:dest},this.setting.scrollduration);},keepfixed:function(){var $window=jQuery(window)
7var controlx=$window.scrollLeft()+$window.width()-this.$control.width()-this.controlattrs.offsetx
8var controly=$window.scrollTop()+$window.height()-this.$control.height()-this.controlattrs.offsety
9this.$control.css({left:controlx+'px',top:controly+'px'})},togglecontrol:function(){var scrolltop=jQuery(window).scrollTop()
10if(!this.cssfixedsupport)this.keepfixed()
11this.state.shouldvisible=(scrolltop>=this.setting.startline)?true:false
12if(this.state.shouldvisible&&!this.state.isvisible){this.$control.stop().animate({opacity:1},this.setting.fadeduration[0])
13this.state.isvisible=true}else if(this.state.shouldvisible==false&&this.state.isvisible){this.$control.stop().animate({opacity:0}
13,this.setting.fadeduration[1])
14this.state.isvisible=false}},init:function(){jQuery(document).ready(function($){var mainobj=scrolltotop
15var iebrws=document.all
16mainobj.cssfixedsupport=!iebrws||iebrws&&document.compatMode=="CSS1Compat"&&window.XMLHttpRequest
17mainobj.$body=(window.opera)?(document.compatMode=="CSS1Compat"?$('html'):$('body')):$('html,body')
18mainobj.$control=$('<div id="topcontrol">'+mainobj.controlHTML+'</div>').css({position:mainobj.cssfixedsupport?'fixed':'absolute',bottom:mainobj.controlattrs.offsety,right:mainobj.controlattrs.offsetx,opacity:0,cursor:'pointer'}).attr({title:'Scroll Back to Top'}).click(function(){mainobj.scrollup();return false}).appendTo('body')
19if(document.all&&!window.XMLHttpRequest&&mainobj.$control.text()!='')mainobj.$control.css({width:mainobj.$control.width()})
20mainobj.togglecontrol()
21$('a[href="'+mainobj.anchorkeyword+'"]').click(function(){mainobj.scrollup()
22return false})
23$(window).bind('scroll resize',function(e){mainobj.togglecontrol()})})}}
24scrolltotop.init()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.