PageSourceSearch

https://www.suntech-power.co.jp/products/js/anchor.js

js suntech-power.co.jp collected 2026-10-02 18:20:10 UTC 1,034 bytes, 45 lines download raw bytes

1$(function () {
2
3	var anc = $('#anchor');
4	var ancHight = anc.outerHeight();
5	var ancOffset = $('#anchor').offset().top;
6	var main = $('#residential');
7	var hight = ancHight + 60;
8
9//スクロールアニメーション
10	$('#anchor a').click(function () {
11		var href = $(this).attr("href");
12		var target = $(href == "#" || href == "" ? 'html' : href);
13		var position = target.offset().top - ancHight;
14		$("html, body").stop().animate({
15			scrollTop: position
16		}, 550, "swing");
17		return false;
18	});
19
20//アンカーリンクエリアの固定化
21	$(window).on('load resize', function () {
22		var ws = $(window).width();
23		var sp = 640;
24		var paddingAncHeight = ancHight + 60;
25		if(ws <= sp) {
26			paddingAncHeight = ancHight + 15;
27		}
28		$(window).scroll(function () {
29			if ($(window).scrollTop() > ancOffset) {
30				anc.addClass('fixed');
31				main.css("padding-top", paddingAncHeight);
32
33			} else {
34				anc.removeClass('fixed');
35				main.css("padding-top", "0");
36			}
37		});
38	});
39
40
41//高さ揃え
42	$('#anchor li a').matchHeight();
43
44
45});

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.