PageSourceSearch

https://i-fieldnet.com/if_new/wp-content/themes/ifield/assets/scripts/common.js

js i-fieldnet.com collected 2026-10-04 05:18:44 UTC 5,232 bytes, 199 lines download raw bytes

1$(function() {
2  $('.top_news_list li a').matchHeight();
3  $('.business_detail_wrap').matchHeight();
4  $('.dropdown > li').matchHeight();
5  $('.case_img').matchHeight();
6});
7
8// ドロップダウン(PCのみ)
9$(window).on('load resize', function(){
10  if(window.matchMedia('(min-width:981px)').matches){
11    $(function(){
12        $('.h_nav > li:first-of-type > a').hover(function(){
13            $(".dropdown").slideDown();
14            $(".dropdown_layer").addClass('show');
15            $(".h_nav > li:first-of-type > a").addClass('show');
16        });
17        $('.closebtn , .dropdown_layer ,.dropdown_ul a').click(function(){
18            $(".dropdown").hide();
19            $(".dropdown_layer").removeClass('show');
20            $(".h_nav > li:first-of-type > a").removeClass('show');
21        });
22    });
23  }
24});
25
26// ドロップダウン(SPのみ)
27$(window).on('load resize', function(){
28  if(window.matchMedia('(max-width:980px)').matches){
29    $(function() {
30      $('.h_nav_toggle > a').on('click', function(){
31        $(this).toggleClass('active');
32        $(this).next('.dropdown').toggleClass('active');
33        $(this).next('.dropdown').slideToggle();
34        return false;
35      });
36    });
37  }
38});
39
40// サイドバー追従(PCのみ)
41$(window).on('load resize', function(){
42  if(window.matchMedia('(min-width:981px)').matches){
43    $(function() {
44      $(".sidebar:not(.sidebar_greeting)").stickySidebar({
45        topSpacing: 372,
46        bottomSpacing: 0,
47        containerSelector: '.corporate_wrapper'
48      });
49    });
50  }
51});
52
53// サイドバー追従(SPのみ)
54$(window).on('load resize', function(){
55  if(window.matchMedia('(max-width:980px)').matches){
56    var navPos = jQuery( '.sidebar' ).offset().top; // グローバルメニューの位置
57    var navHeight = jQuery( '.sidebar' ).outerHeight(); // グローバルメニューの高さ
58    jQuery( window ).on( 'scroll', function() {
59      if ( jQuery( this ).scrollTop() > navPos ) {
60        jQuery( '.sidebar' ).addClass( 'fixed' );
61      } else {
62        jQuery( '.sidebar' ).removeClass( 'fixed' );
63      }
64    });
65  }
66});
67// SPメニュー
68$(function() {
69  $('.menu').on('click', function(){
70    $('.menu, .nav_wrap, #header ,#main ,body ,html').toggleClass('active');
71    return false;
72  });
73});
74$(function() {
75  $('#main').on('click', function(){
76    if ( $(this).hasClass('active') ) {
77      $('.menu, .nav_wrap, #header ,#main ,body ,html').removeClass('active');
78      return false;
79    }
80  });
81});
82
83// FAQ
84$(function() {
85  $('.faq_dl').on('click', function(){
86    $(this).toggleClass('active');
87    $(this).children("dd").slideToggle('fast');
88    return false;
89  });
90});
91
92// FAQ
93if(window.matchMedia('(max-width:980px)').matches){
94  $(function() {
95    $('.f_nav_toggle').on('click', function(){
96      $(this).toggleClass('active');
97      $(this).next().toggleClass('active');
98      $(this).next().slideToggle();
99      return false;
100    });
101  });
102}
103
104// パララックス
105if(window.matchMedia('(max-width:980px)').matches){
106  var rellax = new Rellax('.parallax,.parallax_sp', {
107    speed: 1,
108    center: true,
109    // wrapper: null,
110    round: true,
111    vertical: true,
112    horizontal: false
113  });
114} else {
115  var rellax = new Rellax('.parallax', {
116    speed: 2,
117    center: true,
118    // wrapper: null,
119    round: true,
120    vertical: true,
121    horizontal: false
122  });
123}
124
125//別ページからのアンカーリンク設定
126$(window).on("load",function(e){
127  //アンカーリンク取得
128  var hash = location.hash;
129  //アンカーリンクがあった場合
130  if($(hash).length){
131    e.preventDefault();
132    //ヘッダーの高さ取得
133    var headerH = $('#header').height() + 20;
134    //IE判別
135    var ua = window.navigator.userAgent.toLowerCase();
136    var isIE = (ua.indexOf('msie') >= 0 || ua.indexOf('trident') >= 0);
137    //IEだった場合
138    if (isIE) {
139      setTimeout(function(){
140        var position = $(hash).offset().top;
141        $("html, body").scrollTop(Number(position)-headerH);
142      },500);
143    //IE以外
144    } else {
145      //アンカーリンクの位置取得
146      var position = $(hash).offset().top;
147      //アンカーリンクの位置まで移動
148      $("html, body").scrollTop(Number(position)-headerH);
149    }
150  }
151});
152$(function(){
153  //ヘッダーの高さ取得
154  $('a[href^="#"]').click(function(){
155    var speed = 800;
156    var href= $(this).attr("href");
157    var target = $(href === "#" || href === "" ? 'html' : href);
158    var headerH = $('#header').height() + 20;
159    var position = target.offset().top - headerH;
160    $("html, body").animate({scrollTop:position}, speed, "swing");
161    return false;
162  });
163});
164
165$(function(){
166  $('.mv_slider').slick({
167    autoplay: true,
168    autoplaySpeed: 4000,
169    speed: 1000,
170    dots: false,
171    arrows: false
172  });
173});
174
175
176// 求人情報スライダー
177$("document").ready(function(){
178  $('.case-slider').slick({
179    autoplay: true,
180    autoplaySpeed: 5000,
181    speed: 800,
182    slidesToShow: 3,
183    slidesToScroll: 3,
184    infinite: true,
185    dots: true,
186    arrows: true,
187    responsive: [
188    {
189    breakpoint: 736,
190    settings: {
191      arrows: true,
192      slidesToShow: 1,
193      slidesToScroll: 1,
194      centerMode: false,
195      }
196    }
197    ],
198  });
199});

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.