PageSourceSearch

https://domashnij-portal.ru/modules/mod_up/js/jquerys.js

js domashnij-portal.ru collected 2026-10-04 20:10:09 UTC 2,376 bytes, 56 lines download raw bytes

1jQuery.noConflict();
2var scrolltotop={
3	setting: {startline:500, scrollduration:500, fadeduration:[1500, 100]},
4	controlHTML: '<img src="/modules/mod_up/images/up.png" style="width:64px; height:64px" />',
5	controlattrs: {offsetx:25, offsety:15},
6	anchorkeyword: '#atop',
7	state: {isvisible:false, shouldvisible:false},
8	scrollup:function(){
9		if (!this.cssfixedsupport)
10			this.$control.css({opacity:0})
11		this.$body.animate({scrollTop: 0}, this.setting.scrollduration);
12	},
13	keepfixed:function(){
14		var $window=jQuery(window)
15		var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx
16		var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety
17		this.$control.css({left:controlx+'px', top:controly+'px'})
18	},
19	togglecontrol:function(){
20		var scrolltop=jQuery(window).scrollTop()
21		if (!this.cssfixedsupport) this.keepfixed()
22		this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false
23		if (this.state.shouldvisible && !this.state.isvisible){
24			this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0])
25			this.state.isvisible=true
26		}
27		else if (this.state.shouldvisible==false && this.state.isvisible){
28			this.$control.stop().animate({opacity:0}
28, this.setting.fadeduration[1])
29			this.state.isvisible=false
30		}
31	},
32	init:function(){
33		jQuery(document).ready(function($){
34			var mainobj=scrolltotop
35			var iebrws=document.all
36			mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest
37			mainobj.$body=jQuery('html,body')
38			mainobj.$control=jQuery('<div id="topcontrol">'+mainobj.controlHTML+'</div>')
39				.css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'})
40				.attr({title:'НАВЕРХ СТРАНИЦЫ'})
41				.click(function(){mainobj.scrollup(); return false})
42				.appendTo('body')
43			if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='')
44				mainobj.$control.css({width:mainobj.$control.width()})
45			mainobj.togglecontrol()
46			jQuery('a[href="' + mainobj.anchorkeyword +'"]').click(function(){
47				mainobj.scrollup()
48				return false
49			})
50			jQuery(window).bind('scroll resize', function(e){
51				mainobj.togglecontrol()
52			})
53		})
54	}
55}
56scrolltotop.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.