PageSourceSearch

https://www.keiba.go.jp/js/common.js?date=20220401

js keiba.go.jp collected 2026-10-02 04:15:19 UTC 5,433 bytes, 204 lines download raw bytes

1$(function () {
2	/*ie文字スムージング*/
3/*
4	// ブラウザのUA
5	var userAgent = window.navigator.userAgent.toLowerCase();
6	// IEの判定
7	if (userAgent.indexOf('msie') >= 0 || userAgent.indexOf('trident') >= 0) {
8		$('body p').css(
9			"transform", "rotate(0.05deg)"
10		);
11		$('h1').css(
12			"transform", "rotate(0.05deg)"
13		);
14		$('h2').css(
15			"transform", "rotate(0.05deg)"
16		);
17		$('h3').css(
18			"transform", "rotate(0.05deg)"
19		);
20		$('h4').css(
21			"transform", "rotate(0.05deg)"
22		);
23		$('h5').css(
24			"transform", "rotate(0.05deg)"
25		);
26		$('a').css(
27			"transform", "rotate(0.05deg)"
28		);
29
30		$('table').css(
31			"transform", "rotate(-0.001deg)"
32		);
33
34		$('li').css(
35			"transform", "rotate(0.05deg)"
36		);
37
38		$('iframe').css(
39			"transform", "rotate(0.05deg)"
40		);
41
42		$('img').css(
43			"transform", "none"
44		);
45
46		$('ul.bannerArea li').css(
47			"transform", "none"
48		);
49
50		$('ul.bannerArea li a').css(
51			"transform", "none"
52		);
53
54		$('.feature ul li').css(
55			"transform", "none"
56		);
57
58		$('.feature ul li a').css(
59			"transform", "none"
60		);
61
62                $('select').css(
63                        "transform", "rotate(0.05deg)"
64                );
65	}
66*/
67
68
69	/*ページトップ戻りボタン*/
70	$(window).on('load', function() {
71		$('.scBtnBlock').hide();
72		posBottomBtn()
73	});
74
75	$('.backBtn').on('click', function() {
76		$('body,html').animate({
77			scrollTop: 0
78		}, 800);
79	});
80
81	$(window).on('scroll', function() {
82		posBottomBtn()
83	});
84
85	$(window).on('resize', function() {
86		posBottomBtn()
87	});
88
89	function posBottomBtn() {
90		var stop_pos = $('.footer').offset().top;
91		var footer_h = $('.footer').innerHeight();
92		var page_h = $('body').innerHeight();
93		var scroll_y = $(window).scrollTop(); //スクロール量
94		var add_y = scroll_y + window.innerHeight - stop_pos +10;
95
96		if (scroll_y > 0) {
97			$('.backBtn').fadeIn();
98		} else {
99			$('.backBtn').fadeOut();
100		}
101
102		if (scroll_y + $(window).height() > stop_pos) {
103			$('.backBtn').css({
104				'bottom': add_y + "px"
105			});
106		} else {
107			$('.backBtn').css({
108				'bottom': "10px"
109			});
110		}
111	}
112
113	/*ヘッダ検索窓*/
114	$('.searchBox').on("focusin", function() {
115			$('.topSearch').addClass("focus")
116	});
117	$('.searchBox').on("focusout", function() {
118		$('.topSearch').removeClass("focus")
119	});
120
121
122	/*サブメニューアクティブ判定*/
123	$(window).on('load', function () {
124		var url=window.location;
125		var path= url.href.split('/');
126		var page_name = path.pop().replace(".html", "");
127		var page_dir = path[path.length-1];
128
129		$('.subMenu ul li').each(function () {
130			var active_id = $(this).find('a').attr('id');
131
132			if(page_name.indexOf(active_id)!==-1 || page_dir.indexOf(active_id)!==-1){
133				$(this).find('a').addClass('active')
134			}else{
135				$(this).find('a').removeClass('active')
136			}
137
138		});
139	});
140
141	/*追従バナー位置*/
142	if($('.scrollBanner').css('display')=="block"){
143		$(window).scroll(function () {
144			posScrollBanner();
145		});
146	}
147
148	function posScrollBanner() {
149		var stop_pos = $('footer').offset().top;
150		var footer_h = $('footer').innerHeight();
151		var page_h = $('body').innerHeight();
152		var scroll_y = $(window).scrollTop(); //スクロール量
153		var add_y = scroll_y + window.innerHeight - stop_pos +70;
154
155		if (scroll_y + $(window).height() > stop_pos) {
156			$('.scrollBanner').css({
157				'bottom': add_y + "px"
158			});
159		} else {
160			$('.scrollBanner').css({
161				'bottom': "70px"
162			});
163		}
164	}
165
166});
167
168function FixedAnime() {
169	var headerH = $('header').outerHeight(true);
170	var scroll = $(window).scrollTop();
171	if (scroll > headerH){//headerの高さ以上になったら
172			$('header').addClass('fixed').removeClass('off');
173            if ($('#infoContainer').length){
174              $('#infoContainer').addClass('fixed');//fixedというクラス名を付与
175            }else{
176              $('#mainContainer').addClass('fixed');//fixedというクラス名を付与
177            }
178			$('.headerInner').addClass('fixed');//fixedというクラス名を付与
179			$('.globalNavi').addClass('fixed');//fixedというクラス名を付与
180			$('.topSearch').addClass('fixed');//fixedというクラス名を付与
181            headerbanner00.src = headerbanner00.src.replace('00.png', '00_fixed.png')
182			//headerbanner00.src="img/header_banner_00_fixed.png"
183		}else{//それ以外は
184			$('header').addClass('off').removeClass('fixed');
185            if ($('#infoContainer').length){
186              $('#infoContainer').removeClass('fixed');//fixedというクラス名を付与
187            }else{
188              $('#mainContainer').removeClass('fixed');//fixedというクラス名を付与
189            }
190			$('.headerInner').removeClass('fixed');//fixedというクラス名を除去
191			$('.globalNavi').removeClass('fixed');//fixedというクラス名を除去
192			$('.topSearch').removeClass('fixed');//fixedというクラス名を除去
193
194            headerbanner00.src = headerbanner00.src.replace('00_fixed.png', '00.png')
195			//headerbanner00.src="img/header_banner_00.png"
196		}
197}
198$(window).on('scroll', function() {
199	FixedAnime();/* スクロール途中からヘッダーを出現させる関数を呼ぶ*/
200});
201
202$(window).on('load', function () {
203	FixedAnime();/* スクロール途中からヘッダーを出現させる関数を呼ぶ*/
204});

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.