PageSourceSearch

https://www.yamanashi-spa-glamping.com/wp-content/themes/yamanashi-spa/js/scripts.js

js yamanashi-spa-glamping.com collected 2026-10-04 14:40:24 UTC 1,210 bytes, 36 lines download raw bytes

1
2       
3/* ---------------------
4  Smoothscroll
5--------------------- */
6
7jQuery(function(){
8	jQuery('body').append('<a href="javascript:void(0);" id="fixedTop">Top</a>');
9	var fixedTop = jQuery('#fixedTop');
10	fixedTop.on('click',function(){
11		jQuery('html,body').animate({scrollTop:'0'},500);
12	});
13
14	jQuery(window).on('load scroll resize',function(){
15		var showTop = 100;
16		if(jQuery(window).scrollTop() > showTop){
17			fixedTop.fadeIn('normal');
18		} else {
19			fixedTop.fadeOut('normal');
20		}
21	});
22});
23
24
25// スクロールイベント
26window.addEventListener( "scroll", function() {
27
28  var headerElement = document.getElementById( "header" ) ; // `#header`セレクタを取得
29  var rect = headerElement.getBoundingClientRect() ; // 
30  var y = rect.top + window.pageYOffset ; // Y方向 (縦)にスクロール量を取得(pageYOffset:windowオブジェクト。現在表示位置のY座標を取得)
31  if (y > 0) { // 変数yの値が0よりも
32    headerElement.classList.remove('hidden'); // 大きければhiddensセレクタを削除する
33  } else {
34    headerElement.classList.add('hidden'); // そうでなければhiddensセレクタを追加する
35  }
36} ) ;

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.