PageSourceSearch

https://gysc.or.jp/paris/js/common.js

js gysc.or.jp collected 2026-10-02 19:21:27 UTC 1,933 bytes, 67 lines download raw bytes

1//スムーズスクロール
2// #page-topをクリックした際の設定
3$('header h1 a').click(function () {
4    $('body,html').animate({
5        scrollTop: 0//ページトップまでスクロール
6    }, 500);//ページトップスクロールの速さ。数字が大きいほど遅くなる
7    return false;//リンク自体の無効化
8});
9
10
11
12var Header = $("header");
13var Wrapper = $("#wrapper");
14var Headeros = $("header").offset().top;
15var HeaderH = $("header").innerHeight();
16
17$(window).on("load scroll", function () {
18    /* スクロール位置の高さがxxより大きい、かつfixedクラスがない場合 */
19    if ($(this).scrollTop() > Headeros && Header.hasClass("fixed") == false) {
20        Header.addClass("fixed");
21        Wrapper.addClass("fixed");
22        Wrapper.css( 'padding-top', HeaderH + 'px');
23    }
24    /* スクロール位置の高さがxxより小さい、かつfixedクラスがある場合 */
25    else if ($(this).scrollTop() < Headeros && Header.hasClass("fixed") == true) {
26        Header.removeClass("fixed");
27        Wrapper.removeClass("fixed");
28        Wrapper.css( 'padding-top', 0 + 'px');
29    }
30});
31
32
33//テキストアニメ
34function scroll_txt_fadein(){
35	$('.txt-effect').each(function(){
36		var position = $(this).offset().top;
37		var scroll = $(window).scrollTop();
38		var windowHeight = $(window).height();
39		if (scroll > position - windowHeight + 300){
40		  $(this).addClass('active');
41		}
42	});
43}
44$(function(){
45	$(window).scroll(function (){
46	    scroll_txt_fadein();
47	});
48	scroll_txt_fadein();
49});
50
51//汎用アニメ
52function scroll_fadein(){
53	$('.effect').each(function(){
54		var position = $(this).offset().top;
55		var scroll = $(window).scrollTop();
56		var windowHeight = $(window).height();
57		if (scroll > position - windowHeight + 300){
58		  $(this).addClass('active');
59		}
60	});
61}
62$(function(){
63	$(window).scroll(function (){
64	    scroll_fadein();
65	});
66	scroll_fadein();
67});

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.