PageSourceSearch

https://www.kuriko-an.com/k/ku/kurikoan/js/script.js

js kuriko-an.com collected 2026-10-07 22:59:12 UTC 4,239 bytes, 145 lines download raw bytes

1jQuery(function($){
2  
3  //ヘッダーメニュー
4  var $header = $('.l_header');
5  var $nav = $('.l_header__navi_wrapper');
6  var $headerMenuBtn = $('.toggle_menu');
7  $headerMenuBtn.click(function(){
8      $header.toggleClass('open');
9      $nav.slideToggle('fast');
10  });
11  $headerMenuBtn.on("keydown", function(e) {
12    if(e.keyCode === 13) {
13      $(this).trigger("click");
14    }
15  });
16  
17  //セレクトボックス
18  $('.pseudo_select').each(function () {
19      var selectVal = $('option:selected', this).text();
20      $(this).prepend('<span class="selectVal">' + selectVal + '</span>');
21  });
22
23  $('.pseudo_select').change(function () {
24      var selectVal = $('option:selected', this).text();
25      $('.selectVal', this).text(selectVal);
26  });
27
28  //フォームリセット
29  $('.cancel').click(function(){
30      $('.pseudo_select select > option:first').prop('selected', true);
31      var selectVal2 = $('.pseudo_select select > option:first').text();
32      $('.selectVal').text(selectVal2);
33  });
34  
35  //フォームフォーカス
36  $( '.search_form :input' ).focus( function() {
37    $(this).parent('.pseudo_select').addClass('focus');
38    $(this).parent('label').addClass('focus');
39  } ).blur(function() {
40    $('.pseudo_select').removeClass('focus');
41    $('.pseudo_checkbox label').removeClass('focus');
42  } );
43
44
45  //条件検索
46  var $menuBtn = $('.btn_menu');
47  var $menuList = $('.search_form_wrapper--body');
48
49  $menuBtn.on('click', function(){
50      $menuBtn.toggleClass('open');
51      if($menuBtn.hasClass('open')){
52          $menuList.slideDown('fast');
53          $menuBtn.html('<span>閉じる</span>');
54      }else{
55          $menuList.slideUp('fast');
56          $menuBtn.html('<span>開く</span>');
57      }
58  });
59  $menuBtn.on("keydown", function(e) {
60    if(e.keyCode === 13) {
61      $(this).trigger("click");
62    }
63  });
64
65  //
66  //  スティッキーフッター
67  //
68  //-----------------------------------------------------
69
70  var $window = $(window);
71  var $sticky = $('.sticky_bottom');
72  var threshold = 200;
73  var out_threshold = reset_out_threshold();
74
75  $window.on('scroll', $.throttle(1000 / 15, function () {
76    if ($window.scrollTop() > threshold && $window.scrollTop() < out_threshold) {
77      $sticky.addClass('visible');
78    } else {
79      $sticky.removeClass('visible');
80    }
81  }));
82  $window.trigger('scroll');
83
84  //リサイズ判定とスティッキー用reset_out_threshold呼び出し
85  //横サイズ変更だけでよければコメントアウトとる
86  var timer = false;
87//  var winWidth = $(window).width();
88//  var winWidth_resized;
89
90  $(window).on("resize", function(){
91    if (timer !== false) {
92      clearTimeout(timer);
93    }
94    timer = setTimeout(function() {
95//      winWidth_resized = $(window).width();
96//      if ( winWidth != winWidth_resized ) {
97        // 処理
98        out_threshold = reset_out_threshold();
99//        winWidth = $(window).width();
100//      }
101      $window.trigger('scroll');
102    }, 200);
103  });
104  
105  //reset_out_threshold
106  function reset_out_threshold(){
107    var new_threshold;
108    if($('.sticky_bottom').length){
109      new_threshold = $('.btn_area').get( 0 ).offsetTop - $window.height();
110    }else{
111      new_threshold = 0;
112    }
113    return new_threshold;
114  }
115  
116  //scroll top
117  $('a[href^="#"]').click(function() {
118    var speed = 500;
119    var href= $(this).attr("href");
120    var target = $(href == "#" || href == "" ? 'html' : href);
121    var position = target.offset().top;
122    $("html, body").animate({scrollTop:position}, speed, "swing");
123    return false;
124  });
125  
126});
127
128//* tell link
129//*-------------------------------------------------------*/
130 
131 
132//求人詳細の電話番号部分のみを囲んでおく<span data-action="call">${result.val●●}</span>
133 
134jQuery(function() {
135    if (!isPhone())
136        return;
137 
138    $('span[data-action=call]').each(function() {
139        $(this).wrap('<a class="spn_call" href="tel:' + $(this).text() + '"></a>');
140    });
141});
142 
143function isPhone() {
144    return (navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('Android') > 0);
145}

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.