PageSourceSearch

https://www.gracebells.jp/common/js/global/default.js

js gracebells.jp collected 2026-10-04 15:51:29 UTC 3,427 bytes, 151 lines download raw bytes

1/**
2 *================================================
3 *
4 * [javascript Common]
5 * 
6 *================================================
7 */
8/**
9 * ブラウザ判定 
10 */
11var userAgent=window.navigator.userAgent.toLowerCase();
12var browserIE=0; //IE判定
13var browser_v=0; //IEバージョン番号
14var browser_nm=""; //browser名
15
16if (/*@cc_on!@*/false) {
17
18	browserIE=1;
19	browser_nm="IE";
20
21	if (navigator.userAgent.match(/MSIE (¥d¥.¥d+)/)) {browser_v=parseFloat(RegExp.$1);}//IE6.7.8.9
22
23	}
24	else if (userAgent.indexOf("firefox") > -1) {browser_nm="Firefox";}
25	else if (userAgent.indexOf("opera") > -1) {browser_nm="Opera";}
26	else if (userAgent.indexOf("chrome") > -1) {browser_nm="Chrome";}
27	else if (userAgent.indexOf("safari") > -1) {browser_nm="Safari";}
28	else {
29	browser_nm="Unknown";
30}
31/**
32 * strict対策blank open
33 */
34function blankOpen(url) {
35	window.open(url);
36}
37/**
38 * preload
39 */
40jQuery.preimg=function() {
41	for(var i=0; i < arguments.length; i++) {
42		$('<img>').attr('src', arguments[i]);
43	}
44};
45/**
46 * GET値の取得
47 */
48var qsParm=new Array();
49 
50function retrieveGETqs() {
51	var query=window.location.search.substring(1);
52	var parms=query.split('&');
53	for (var i=0; i < parms.length; i++) {
54		var pos=parms[i].indexOf('=');
55		if (pos > 0) {
56			var key=parms[i].substring(0, pos);
57			var val=parms[i].substring(pos +1);
58			qsParm[key]=val;
59		}
60	}
61	return qsParm;
62}
63(function($) {
64	$(function() {
65		/**
66		 * rollover
67		 */
68		var imgCache;
69		
70		$("a > .roImg").hover(function() {
71			var imgSrc 		= $(this).attr('src');
72			var imgSrcDot 	= imgSrc.lastIndexOf('.');
73			var imgSrcOver 	= imgSrc.substr(0, imgSrcDot) + '_on' + imgSrc.substr(imgSrcDot, 4);
74			
75			imgCache=imgSrc;
76			$(this).attr('src', imgSrcOver);
77		}, function() {
78			$(this).attr('src', imgCache);
79		});
80		/**
81		 * go to page top
82		 */
83		/*$('#pageTopBt').click(function() {
84			$('html, body').animate({ scrollTop: 0 }, 500);
85		});*/
86		/**
87		 * 高さ合わせ
88		 */
89		$('.adjustList').each(function() {
90			var setHeight=0;
91			
92			$(this).children().each(function() {
93				var getHeight=$(this).height();
94				
95				if (getHeight > setHeight) {
96					setHeight=getHeight;
97				}
98			});
99			
100			$(this).children().height(setHeight);
101			
102			if ($(this).children().length== 0) {
103				$(this).remove();
104			}
105		});
106		/**
107		 * preload image
108		 */
109		jQuery.preimg(
110			// imgソースを記述することで画像を先読みする
111			// 例)
112			// '/images/global/test.jpg'
113		);
114		$('.jqHover').each(function() {
115			// if (!$.support.opacity) return;
116			$(this).fadeTo(0, 1.0);
117			$(this).hover(function() {
118				$(this).fadeTo(300, 0.5);
119			}, function() {
120				$(this).stop(true, true).fadeTo(300, 1.0);
121			});
122		});
123		/**
124		 *  #で始まるアンカーをクリックした場合のスムーススクロール
125		 */
126		var $anchors 	= $(" a[href^='#'].scroll");
127		var $doc 		= $(browser_nm=== 'Chrome' || browser_nm=== 'Safari' ? 'body' : 'html');
128		var speed 		= 1500;
129	         
130		$anchors.each(function(){
131			var $anchor 	= $(this);
132			var anchorID 	= $anchor.attr('href');
133			var $target 	= $(anchorID);
134			
135			$anchor.click(function(e) {
136				var targetPositionTop=$target.offset().top;
137				
138				$doc.stop().animate({
139					scrollTop: targetPositionTop
140				}, 'normal', 'easeInQuad');
141				return false;
142			});
143		});
144		/**
145		 * フォーカス時に選択状態にする
146		 */
147		$('.autoFocus').click(function() {
148			$(this).select();
149		});
150	});	
151}(jQuery));

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.