PageSourceSearch

https://newsmomonga.com/wp-content/themes/keni61_wp_corp_131117/js/utility.js

js newsmomonga.com collected 2026-10-06 12:45:17 UTC 2,237 bytes, 84 lines download raw bytes

1jQuery(function(){
2
3//マウスオーバー(ファイルの末尾に「_off」「_on」で切り替え)
4$("img.over,input.over")
5.each( function(){
6	$("<img>,<input>").attr("src",$(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"));
7})
8.mouseover( function(){
9	$(this).attr("src",$(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"));
10})
11.mouseout( function(){
12	$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1_off$2"));
13});
14
15//検索ボックス内のテキスト
16$(".search").val("検索ワードを入力");
17$(".search").focus( function(){
18	var searchWord=$(this);
19		if(searchWord.val()=='検索ワードを入力'){
20		$(this).val(""),
21		$(this).addClass("onfocus");
22	};
23});
24$(".search").blur( function(){
25	var searchWord=$(this);
26		if(searchWord.val()==''){
27		$(this).val("検索ワードを入力"),
28		$(this).removeClass("onfocus");
29	};
30});
31
32//テーブルのセルとリストに偶数・奇数を付与
33$("li:odd,tr:odd").addClass("odd"),
34$("li:even,tr:even").addClass("even");
35
36//スムーズスクロール
37$("a[href^=#]").click(function(){
38	var Hash = $(this.hash);
39	var HashOffset = $(Hash).offset().top;
40	$("html,body").animate({
41		scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
42	return false;
43});
44
45//グローバルメニューのプルダウン設定
46$("#global-nav .menu li").hover(function() {
47	$("> ul:not(:animated)", this).fadeIn("normal");
48}, function() {
49	$("> ul", this).fadeOut("normal");
50});
51
52//グローバルメニュー用のIE「z-index」バグ対策
53var zNum = 1000;
54$('#global-nav li').each(function() {
55	$(this).css('zIndex', zNum);
56	zNum = zNum-10;
57});
58
59//モバイル用のグローバルメニュー設定
60$(".btn-gnav").click(function(){
61	$(".menu-wrap").toggleClass("showMenu");
62});
63
64//モバイル用のサイドバーとサブコンテンツの設定
65$(".sub-contents-btn").click(function(){
66	$(".sub-column #sub-contents-in").toggleClass("showSubConts");
67});
68
69$(".sidebar-btn").click(function(){
70	$(".sub-column #sidebar-in").toggleClass("showSidebar");
71});
72
73//クリックでテキストを選択
74$(".text-field")
75	.focus(function(){
76		$(this).select();
77	})
78	.click(function(){
79		$(this).select();
80		return false;
81});
82
83});
84

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.