PageSourceSearch

https://www.cev-pc.or.jp/common2/js/common.js?v=1

js cev-pc.or.jp collected 2026-10-02 04:12:56 UTC 4,261 bytes, 131 lines download raw bytes

1/* ページ内リンクの処理  */
2$(function(){
3   // #で始まるアンカーをクリックした場合に処理
4   $('a.pagelink[href^=#]').click(function() {
5      // スクロールの速度
6      var speed = 400; // ミリ秒
7      // アンカーの値取得
8      var href= $(this).attr("href");
9      // 移動先を取得
10      var target = $(href == "#" || href == "" ? 'html' : href);
11      // 移動先を数値で取得
12      var position = target.offset().top;
13      // スムーススクロール
14      $('body,html').animate({scrollTop:position}, speed, 'swing');
15		  return false;
16   });
17});
18
19/* .imghover ホバーした時の処理  */
20$(function(){
21	$('.imghover').live('mouseenter',function(){
22		$(this).not(':animated').animate({'opacity':'0.7'},{duration:200});
23	});
24	$('.imghover').live('mouseleave',function(){
25		$(this).animate({'opacity':'1'},{duration:200});
26	});
27});
28
29/* .imgchange ホバーした時の処理(画像変更)  */
30//画像に直接付ける場合
31
32$(function(){
33	$('.imgchange').mouseenter(function(){
34		if(!$(this).hasClass('active')){
35			$(this).attr('src',$(this).attr('src').replace('.jpg','_on.jpg'));
36			$(this).attr('src',$(this).attr('src').replace('.gif','_on.gif'));
37			$(this).attr('src',$(this).attr('src').replace('.png','_on.png'));
38		};
39	});
40	$('.imgchange').mouseleave(function(){
41		if(!$(this).hasClass('active')){
42			$(this).attr('src',$(this).attr('src').replace('_on.jpg','.jpg'));
43			$(this).attr('src',$(this).attr('src').replace('_on.gif','.gif'));
44			$(this).attr('src',$(this).attr('src').replace('_on.png','.png'));
45		};
46	});
47});
48
49/*ヘッダーの追尾*/
50$(function(){
51  $(".header-menu").hide();
52  $(".header-gnav").hover(function(){
53    $(this).find(".header-menu").stop().show();
54  },function(){
55    $(this).find(".header-menu").stop().hide();
56  });
57});
58
59/*サイドアコーディオン*/
60$(function(){
61	$("#m-accordion dt").on("click", function() {
62		$(this).next().slideToggle();
63		$(this).toggleClass("active");//追加部分
64	});
65});
66
67
68$(document).ready(function(){
69 
70    $(".m-pagetop").hide();
71     // ↑ページトップボタンを非表示にする
72 
73    $(window).on("scroll", function() {
74 
75        if ($(this).scrollTop() > 100) {
76            // ↑ スクロール位置が100よりも小さい場合に以下の処理をする
77            $('.m-pagetop').slideDown("fast");
78            // ↑ (100より小さい時は)ページトップボタンをスライドダウン
79        } else {
80            $('.m-pagetop').slideUp("fast");
81            // ↑ それ以外の場合の場合はスライドアップする。
82        }
83         
84    // フッター固定する
85 
86        scrollHeight = $(document).height(); 
87        // ドキュメントの高さ
88        scrollPosition = $(window).height() + $(window).scrollTop(); 
89        // ウィンドウの高さ+スクロールした高さ→ 現在のトップからの位置
90        footHeight = $("footer").innerHeight();
91        // フッターの高さ
92                 
93        if ( scrollHeight - scrollPosition  <= footHeight ) {
94        // 現在の下から位置が、フッターの高さの位置にはいったら
95        //  ".m-pagetop"のpositionをabsoluteに変更し、フッターの高さの位置にする        
96            $(".m-pagetop").css({
97                "position":"fixed",
98                "right" : "4%" ,
99                "bottom": "0"
100            });
101        } else {
102        // それ以外の場合は元のcssスタイルを指定
103            $(".m-pagetop").css({
104                "position":"fixed",
105                "right" : "4%" ,
106                "bottom": "0px"
107            });
108        }
109    });
110 
111    // トップへスムーススクロール
112    $('.m-pagetop a').click(function () {
113        $('body,html').animate({
114        scrollTop: 0
115        }, 500);
116        // ページのトップへ 500 のスピードでスクロールする
117        return false;
118     });
119 
120});
121
122$(function(){
123    // トップへスムーススクロール
124    $('.m-pagetop a').click(function () {
125        $('body,html').animate({
126        scrollTop: 0
127        }, 500);
128        // ページのトップへ 500 のスピードでスクロールする
129        return false;
130     });
131});

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.