PageSourceSearch

https://www.gendai-a.co.jp/js/jquery-script.js

js gendai-a.co.jp collected 2026-10-04 13:33:19 UTC 7,116 bytes, 230 lines download raw bytes

1//スムーススクロール
2$(function(){
3  $('a[href^=#]').click(function() {
4    var speed = 400; // ミリ秒
5    var href= $(this).attr("href");
6    var target = $(href == "#" || href == "" ? 'html' : href);
7    var position = target.offset().top;
8    $('body,html').animate({scrollTop:position}, speed, 'swing');
9    return false;
10  });
11});
12
13//ヘッダー、フローティングメニュー
14$(function(){
15  $(".header_navi_list_item").hover(
16    function() {
17      $(this).children(".header_navi_floatList").fadeIn(250);
18    },
19    function() {
20      $(this).children(".header_navi_floatList").fadeOut(250);
21    }
22  );
23  $(".header_menu_lang").hover(
24    function() {
25      $(this).children(".header_navi_floatList").fadeIn(250);
26    },
27    function() {
28      $(this).children(".header_navi_floatList").fadeOut(250);
29    }
30  );
31});
32
33//ヘッダー、ポップアップメニュー
34$(function(){
35  $(".header_menu_btn").click(function() {
36    $(".header_popup").fadeIn(250);
37  });
38  $(".header_menu_close").click(function() {
39    $(".header_popup").fadeOut(250);
40  });
41});
42
43//スマホのフッターメニュー
44var $win = $(window);
45$win.on('load resize', function() {
46  var windowWidth = window.innerWidth;
47  if (windowWidth < 640) {
48    $(".footer_navi_title").on("click", function() {
49      $(this).next().slideToggle();
50      $(this).toggleClass("open")
51    });
52  }
53});
54
55//トップ、メインビジュアル,、ランダム表示
56/*
57$(function(){
58  randNum = Math.floor(Math.random() * (9)) + 1;
59  $('.top_mv_slider li').addClass('bg0' + randNum);
60});
61$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img01').addClass('bg0' + randNum); });
62$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img02').addClass('bg0' + randNum); });
63$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img03').addClass('bg0' + randNum); });
64$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img04').addClass('bg0' + randNum); });
65$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img05').addClass('bg0' + randNum); });
66$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img06').addClass('bg0' + randNum); });
67$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img07').addClass('bg0' + randNum); });
68$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img08').addClass('bg0' + randNum); });
69$(function(){ randNum = Math.floor(Math.random() * (9)) + 1; $('.top_mv_slider .img09').addClass('bg0' + randNum); });
70*/
71
72//トップ、メインビジュアル,、ランダム表示
73/*
74$(function(){
75  var slider = $('.top_mv_slider').bxSlider({
76  // $(".top_mv_slider").bxSlider({
77    auto: "true",
78    mode: "fade",
79    pause: 4000,
80    speed: 2000,
81    controls: false
82  });
83  var arr = [];
84  $('.top_mv_slider li').each(function() {
85    arr.push($(this).html());
86  });
87  arr.sort(function() {
88    return Math.random() - Math.random();
89  });
90  $('.top_mv_slider').empty();
91  for(i=0; i < arr.length; i++) {
92    $('.top_mv_slider').append('<li class="bg0' + arr[i] + '">' + arr[i] + '</li>');
93    // $('.top_mv_slider').append('<li style="background-image: url(./img/top/mv0' + arr[i] + '.jpg);">' + arr[i] + '</li>');
94  }
95  slider.reloadSlider();
96});
97*/
98
99//トップ、ヘッダー固定
100/*
101$(function(){
102  $(window).on("load", function (){
103    $(window).scroll(function(){
104      var sec = $('.top .header_trigger').offset().top;
105      var scr_count = $(document).scrollTop();
106      if(scr_count > sec){
107        $('.top .header').addClass('fixed');
108        $('.top .c_main').addClass('mt');
109      } else {
110        $('.top .header').removeClass('fixed');
111        $('.top .c_main').removeClass('mt');
112      }
113    });
114  });
115});
116*/
117
118//アコーディオン
119$(function(){
120  $(".js-accordion").on("click", function() {
121    $(this).next().slideToggle();
122    $(this).toggleClass("open")
123  });
124});
125
126//フェードイン
127$(function() {
128  $('.fadeIn').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
129    if(isInView){
130      $(this).stop().addClass('fadeInMove');
131    }
132  });
133  $('.fadeIn_200').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
134    if(isInView){
135      var fadeIn_late = $(this);
136      setTimeout(function(){
137        $(fadeIn_late).stop().addClass('fadeInMove');
138      },200);
139    }
140  });
141  $('.fadeIn_400').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
142    if(isInView){
143      var fadeIn_late = $(this);
144      setTimeout(function(){
145        $(fadeIn_late).stop().addClass('fadeInMove');
146      },400);
147    }
148  });
149  $('.fadeIn_600').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
150    if(isInView){
151      var fadeIn_late = $(this);
152      setTimeout(function(){
153        $(fadeIn_late).stop().addClass('fadeInMove');
154      },600);
155    }
156  });
157});
158
159//service、hoverでtitle画像とボタンの変化
160$(function(){
161  $(".service_top_list_item").hover(
162    function() {
163      $(this).find(".c_btn").removeClass("white");
164    },
165    function() {
166      $(this).find(".c_btn").addClass("white");
167    }
168  );
169  $(".service_top_list_item:nth-child(1)").hover(
170    function() {
171      $(this).find("img").attr("src","../img/service/ttl_top01_on.png");
172    },
173    function() {
174      $(this).find("img").attr("src","../img/service/ttl_top01.png");
175    }
176  );
177  $(".service_top_list_item:nth-child(2)").hover(
178    function() {
179      $(this).find("img").attr("src","../img/service/ttl_top02_on.png");
180    },
181    function() {
182      $(this).find("img").attr("src","../img/service/ttl_top02.png");
183    }
184  );
185  $(".service_top_list_item:nth-child(3)").hover(
186    function() {
187      $(this).find("img").attr("src","../img/service/ttl_top03_on.png");
188    },
189    function() {
190      $(this).find("img").attr("src","../img/service/ttl_top03.png");
191    }
192  );
193  $(".service_top_list_item:nth-child(4)").hover(
194    function() {
195      $(this).find("img").attr("src","../img/service/ttl_top04_on.png");
196    },
197    function() {
198      $(this).find("img").attr("src","../img/service/ttl_top04.png");
199    }
200  );
201  $(".service_top_list_item:nth-child(5)").hover(
202    function() {
203      $(this).find("img").attr("src","../img/service/ttl_top06_on.png");
204    },
205    function() {
206      $(this).find("img").attr("src","../img/service/ttl_top06.png");
207    }
208  );
209  $(".service_top_list_item:last-of-type").hover(
210    function() {
211      $(this).find("img").attr("src","../img/service/ttl_top05_on.png");
212    },
213    function() {
214      $(this).find("img").attr("src","../img/service/ttl_top05.png");
215    }
216  );
217});
218
219
220// スマホ時電話番号をリンク化
221$(function(){
222  var device = navigator.userAgent;
223  if((device.indexOf('iPhone') > 0 && device.indexOf('iPad') == -1) || device.indexOf('iPod') > 0 || device.indexOf('Android') > 0){
224    $('.js-phone-link').each(function() {
225      var text = $(this).html();
226      var number = text.replace('-', '');
227      $(this).html('<a href="tel:' + number + '">
227' + text + '</a>');
228    });
229  }
230});

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.