PageSourceSearch

https://www.cityjob.jp/c/ci/citytrusthonten/js/renewal.js

js cityjob.jp collected 2026-09-30 23:24:02 UTC 7,023 bytes, 259 lines download raw bytes

1/*----------------------------------------------------------
2* information  :: common.js
3* tsujino added :: 2016.12
4* improved :: 2019.04
5----------------------------------------------------------*/
6
7//* device
8//*-------------------------------------------------------*/
9
10var userAgent = window.navigator.userAgent.toLowerCase();
11if( userAgent.match('msie') || userAgent.match('trident') ) {
12    var isIE = true;
13    // $('html').addClass('ie');
14}
15
16
17//* smooth scroller
18//*-------------------------------------------------------*/
19
20$(function(){
21
22    // smooth scroller
23    $('a[href*="#"]').on('click', function() {
24        var hash = this.hash;
25		if (!hash || hash == '#') {
26			return false;
27		}
28		var offset = $(hash).offset();
29		if (!offset) {
30			return true;
31		}
32        
33        //メニュー除く
34        var menu_height = 0;
35//        if ($('.job_menu.fixed').length){
36//            var menu_height = $('.job_menu.fixed').outerHeight();
37//        }
38
39        $('body,html').animate({scrollTop: (offset.top - menu_height)}, 800, 'swing');
40        return false;
41    });
42
43});
44
45
46//* スクロール
47//*-------------------------------------------------------*/
48
49$(function () {
50    var _height = window.innerHeight;
51    var b_height = $('body').height();
52
53    $(window).on('scroll',function () {
54        if ($(window).scrollTop() < _height *0.5) {
55            $('body').removeClass('scrolled');
56        } else {
57            $('body').addClass('scrolled');
58        }
59        if ($(window).scrollTop() > b_height - (_height * 1.5)) {
60            $('body').addClass('scroll_end');
61        } else {
62            $('body').removeClass('scroll_end');
63        }
64    });
65});
66
67//* toggle
68//*-------------------------------------------------------*/
69
70//gナビ
71$(window).on('load',function() {
72    $('body').removeClass('nav_op');
73});
74
75var state = false;
76var scrollpos;
77$('.g_nav_toggle').on('click', function(){
78    $(this).toggleClass('open');
79    if(state == false) {
80        scrollpos = $(window).scrollTop();
81        $('body').addClass('nav_op').css({'top': -scrollpos});
82        state = true;
83    } else {
84        $('body').removeClass('nav_op').css({'top': 0});
85        window.scrollTo( 0 , scrollpos );
86        state = false;
87    }
88});
89
90$('.g_nav a[href*="#"]').on('click', function() {
91	if ($('body').hasClass('nav_op')) {
92		$('.g_nav_toggle').trigger('click');
93	}
94});
95
96
97// IE用
98//*-------------------------------------------------------*/
99
100if (isIE == true) {
101    //svg
102    $('.top_mv_txt svg:first-child').attr('id', 'top_mv_txt1');
103    new Vivus('top_mv_txt1', {duration: 80}, function(){
104        $('.top_mv_txt .cls-1').animate({
105            'fill-opacity': 1
106        }, 300)
107    });
108    
109    //タイトル
110    ie_letter();
111}
112
113function ie_letter() {
114    $('.index_section_title').children().addBack().contents().each(function () {
115        if (this.nodeType == 3) {
116            $(this).replaceWith($(this).text().replace(/(\S)/g, '<span class="letter">$&</span>'));
117        }
118    });
119    $('.index_section_title.slide_clip > span').addClass('an_delay_box')
120        .each(function () {
121            const index = $(this).index();
122            $(this).find('.letter').addClass('an_delay');
123            $(this).find('.letter').css({
124                'transition-delay': 0.3 * index + 's'
125            });
126    });
127
128}
129
130
131// inview
132//*-------------------------------------------------------*/
133
134function scroll(){
135
136    $('.an').on('inview', function(event, isInView) {
137        if (isInView) {
138            $(this).stop().addClass('animated');
139        } else {
140            //            $(this).removeClass('animated');
141        }
142    });
143
144    $('.an_both').on('inview', function(event, isInView) {
145        if (isInView) {
146            $(this).stop().addClass('animated');
147        } else {
148            $(this).removeClass('animated');
149        }
150    });
151
152    $('.an_delay_box').on('inview', function(event, isInView) {
153        if (isInView) {
154            $(this).find('.an_delay').each(function (idx, elem) {
155                $(this).delay(idx * 100).queue(function(){
156                    $(this).stop().addClass('animated');
157                });
158            });
159        } else {
160            //                $(this).find('.an_delay').removeClass('animated');
161        }
162    });
163
164    $('.an_delay_box_both').on('inview', function(event, isInView) {
165        if (isInView) {
166            $(this).find('.an_delay').each(function (idx, elem) {
167                $(this).delay(idx * 100).queue(function(){
168                    $(this).stop().addClass('animated');
169                });
170            });
171        } else {
172            $(this).find('.an_delay').removeClass('animated');
173        }
174    });
175
176    var _width = $(window).width();
177    if (_width > 767){
178        $('.an_rp_box').on('inview', function(event, isInView) {
179            if (isInView) {
180                $(this).find('.an_rp').each(function (idx, elem) {
181                    $(this).delay(idx * 200).queue(function(){
182                        $(this).stop().addClass('animated');
183                    });
184                });
185            } else {
186                //                $(this).find('.fade_rp').removeClass('animated');
187            }
188        });
189    } else {
190        $('.an_rp').on('inview', function(event, isInView) {
191            if (isInView) {
192                $(this).stop().addClass('animated');
193            } else {
194                //            $(this).removeClass('animated');
195            }
196        });
197    }
198}
199
200scroll();
201
202
203
204//* top検索部分
205function search_view() {
206    $('.index_search_box').on('inview', function (event, isInView) {
207        if (isInView) {
208            $(this).css({
209                'opacity': '1',
210                'transition-delay': '0s'
211            });
212            $(this).parents('.index_search').css({
213                'background': '#121e34',
214                'transition': '0.5s'
215            })
216        }
217    });
218}
219
220$(function(){
221    if ($(window).scrollTop() > 10) {
222        search_view();
223    }
224});
225
226$(window).on('scroll', function () {
227    const _height = window.innerHeight;
228    if ($(window).scrollTop() > _height * 0.6) {
229        search_view();
230    }
231});
232
233
234//* スライド
235//*-------------------------------------------------------*/
236
237$(document).ready(function(){
238    $('.index_newjobs_slide').slick({
239        dots: true,
240        // fade: true,
241        // arrows: false,
242        speed: 800,
243        autoplay: true,
244        autoplaySpeed: 2000,
245        slidesToShow: 4.5,
246        centerMode: true,
247        responsive: [
248            {
249                breakpoint: 767,
250                settings: {
251                    slidesToShow: 1,
252                    centerMode: false
253                    // centerPadding: '5vw'
254                }
255            }
256        ]
257    });
258});
259    

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.