PageSourceSearch

https://www.mixonline.jp/Portals/0/js/smoothScroll/smoothScroll.js

js mixonline.jp collected 2026-10-02 02:36:36 UTC 1,982 bytes, 77 lines download raw bytes

1/* ================================
2
3infoNet smoothScroll.js   ver3.0
4
5================================ */
6
7;(function($){
8	$.fn.smoothScroll = function(options){
9		var opt = $.extend({
10			fix: false,
11			fixItem: 'header',
12			speed: 300
13		}, options);
14
15		// $.isEnabled = function(){
16		// 	var o = this, callee = arguments.callee;
17		// 	if(!(o instanceof callee)) return new callee(o,arguments);
18		// 	var body  = $('body'),isHide = body.is(':hidden');
19		// 	!isHide || body.show();
20		// 	for(var i in o) if(typeof o[i] == 'function') callee[i] = o[i]();
21		// 	!isHide || body.hide();
22		// };
23
24		// $.isEnabled.prototype.htmlScroll = function(){
25		// 	var html = $('html'), top = html.scrollTop();
26		// 	var el = $('<div/>').height(10000).prependTo('body');
27		// 	html.scrollTop(10000);
28		// 	var rs = !!html.scrollTop();
29		// 	html.scrollTop(top);
30		// 	el.remove();
31		// 	return rs;
32		// };
33
34		// $.isEnabled();
35
36		$(window).on('load', function() {
37			var href = $(location).attr('href');
38			if (href.indexOf('#') != -1) {
39				var id = href.split('#');
40				$target = id[id.length - 1];
41				if ($('a[name="' + $target + '"]')[0]) {
42					$target = $('a[name="' + $target + '"]');
43				} else {
44					$target = $('#' + $target);
45				}
46				if ($target[0]) {
47					_scroll($target.offset().top);
48				}
49			}
50		});
51
52		this.on('click', function() {
53			var href, $target;
54			href = $(this).attr('href');
55			var id = href.split('#');
56			$target = id[id.length - 1];
57			if ($('a[name="' + $target + '"]')[0]) {
58				$target = $('a[name="' + $target + '"]');
59			} else {
60				$target = $('#' + $target);
61			}
62			if ($target[0]){
63				_scroll($target.offset().top);
64			}
65		});
66
67		function _scroll(data){
68			if(opt.fix){
69				data -= $(opt.fixItem).innerHeight();
70			}
71			// $($.isEnabled.htmlScroll ? 'html' : 'body').animate({
72			$('html, body').animate({
73				scrollTop:data
74			}, opt.speed, 'linear');
75		}
76	};
77})($1112);

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.