PageSourceSearch

https://kaishi-pu.ac.jp/wp/wp-content/themes/kaishi/assets/js/admissions/admissions_script.js?=v1

js kaishi-pu.ac.jp collected 2026-09-24 19:05:20 UTC 9,578 bytes, 335 lines download raw bytes

1setTimeout(function() {
2    $('.p-mv').addClass('active');
3}, 2000);
4
5setTimeout(function() {
6    $('.p-mv__opening').css('display', 'none');
7}, 2000);
8
9
10/*スライダーオプション*/
11var slickOptions = {
12    infinite: true,
13    slidesToShow: 1,
14    slidesToScroll: 1,
15    arrows: true,
16    dots: false,
17    autoplay: false,
18    fade: false,
19    pauseOnHover: true,
20    speed: 500,
21    prevArrow: '<img src="images/2211sj_slide-arrow_l.png" class="slick-arrow slick-arrow--atelier slick-prev">',
22    nextArrow: '<img src="images/2211sj_slide-arrow_r.png" class="slick-arrow slick-arrow--atelier slick-next">',
23}
24
25$slider1 = $('.p-column--01 .a-slider'),
26    $nowcnt1 = $('.p-column--01 .a-slider__count .num .nowcnt'),
27    $allcnt1 = $('.p-column--01 .a-slider__count .num .allcnt');
28
29$slider1.on('init reInit afterChange', function(event, slick) {
30    $nowcnt1.text(slick.currentSlide + 1);
31    $allcnt1.text(slick.slideCount);
32})
33// スライド切り替え前に発火
34$slider1.on("beforeChange", function(event, slick, currentSlide, nextSlide) {
35    $nowcnt1.text(nextSlide + 1);
36});
37
38$slider2 = $('.p-column--02 .a-slider'),
39    $nowcnt2 = $('.p-column--02 .a-slider__count .num .nowcnt'),
40    $allcnt2 = $('.p-column--02 .a-slider__count .num .allcnt');
41
42$slider2.on('init reInit afterChange', function(event, slick) {
43    $nowcnt2.text(slick.currentSlide + 1);
44    $allcnt2.text(slick.slideCount);
45})
46// スライド切り替え前に発火
47$slider2.on("beforeChange", function(event, slick, currentSlide, nextSlide) {
48    $nowcnt2.text(nextSlide + 1);
49});
50
51function slider() {
52    $slider1.slick(slickOptions);
53    $slider2.slick(slickOptions);
54}
55
56jQuery(function($) {
57    //inview
58    $('.js-inview').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
59        $(this).stop().addClass('is-active');
60    });
61
62    //popup
63    $(function() {
64        $('.js-popup').magnificPopup({
65            type: 'inline',
66            preloader: false,
67            /*closeMarkup: '<button title="%title%" type="button" class="mfp-close"><img src="images/2211sj_popup_close.png"></button>'*/
68        });
69
70        $('.js-popup_img-gallery').magnificPopup({
71            delegate: 'a',
72            type: 'image',
73            gallery: {
74                enabled: true
75            }
76        });
77    });
78
79
80    /*クレジットボタン*/
81    var creitBtn = $('.c-btn__pd');
82    creitBtn.on('click', function() {
83        $(this).toggleClass('is-open').next('.p-item__credit--other').toggleClass('is-show');
84    });
85
86    /*詳細を見るボタン*/
87    var detailBtn = $('.c-btn__detail');
88    var detailBox = $('.c-box__detail');
89   $('.c-box__detail').hide();
90    detailBtn.off('click');
91    detailBtn.click(function() {
92        $(this).toggleClass('is-open').next(detailBox).toggleClass('is-show');
93    });
94
95
96    //背景色つき画像表示
97    speed = 500;
98    easing = "easeInOutCubic";
99    // タグ生成
100    $(".a-bgExtendImg").wrap("<div class='mask__wrap'>");
101    $(".a-bgExtendImg").append("<div class='mask__bg'></div>");
102    $('.a-bgExtendImg').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
103        if (isInView) {
104
105            $(this).stop().animate({ "left": "0%" }, speed, function() {
106                $(this).find(".mask__bg").stop().animate({ "left": "100%" }, speed);
107            });
108
109        }
110
111    });
112
113    // Slider
114    slider();
115
116
117    $(".js-scrollTop").click(function() {
118        var position = 0;
119        var speed = 600;
120        $("html,body").animate({ scrollTop: position }, speed);
121
122    });
123
124
125});
126
127
128$(function() {
129    var Accordion = function(el, multiple) {
130        this.el = el || {};
131        // more then one submenu open?
132        this.multiple = multiple || false;
133
134        var dropdownlink = this.el.find('.dropdownlink');
135        dropdownlink.on('click', { el: this.el, multiple: this.multiple },
136            this.dropdown);
137    };
138
139    Accordion.prototype.dropdown = function(e) {
140        var $el = e.data.el,
141            $this = $(this),
142            //this is the ul.submenuItems
143            $next = $this.next();
144
145        $next.slideToggle();
146        $this.parent().toggleClass('open');
147
148        if (!e.data.multiple) {
149            //show only one menu at the same time
150            $el.find('.submenuItems').not($next).slideUp().parent().removeClass('open');
151        }
152    }
153
154    var accordion = new Accordion($('.accordion-menu'), false);
155})
156
157
158
159/*アコーディオン */
160$('.c-accordion__btn').on('click', function() {
161    var findElm = $(this).next(".c-accordion__box");
162    $(findElm).slideToggle();
163    if ($(this).hasClass('is-close')) {
164        $(this).removeClass('is-close');
165    } else {
166        $(this).addClass('is-close');
167    }
168});
169
170$(window).on('load', function() {
171    $('.accordion__list').addClass("is-open");
172    $(".is-open").each(function(index, element) {
173        var Title = $(element).children('.c-accordion__btn');
174        $(Title).addClass('is-close');
175        var Box = $(element).children('.c-accordion__box');
176        $(Box).slideDown(500);
177    });
178});
179
180
181
182
183/*タブ切り替え*/
184$(function() {
185    $('.c-switch__btn').on('click', function() {
186        var $switchWrap = $(this).parents('.c-switch__wrap');
187        var $switchBontents = $switchWrap.find(".c-switch__btn");
188        var $switchContents = $switchWrap.find('.c-switch__contents');
189        $switchBontents.removeClass('is_show');
190        $(this).addClass('is_show');
191        var $elmIndex = $switchBontents.index(this);
192        $switchContents.removeClass('is_show');
193        $switchContents.eq($elmIndex).addClass('is_show');
194    });
195
196    $('.js-switch__btn').on('click', function() {
197        var $switchWrap = $(this).parents('.js-switch__wrap');
198        var $switchBontents = $switchWrap.find(".js-switch__btn");
199        var $switchContents = $switchWrap.find('.js-switch__contents');
200        $switchBontents.removeClass('is_show');
201        $(this).addClass('is_show');
202        var $elmIndex = $switchBontents.index(this);
203        $switchContents.removeClass('is_show');
204        $switchContents.eq($elmIndex).addClass('is_show');
205    });
206});
207
208
209/*スライダー*/
210$(function() {
211    //インジケーター(横棒)
212    $('.c-slick').slick({
213        autoplay: true,
214        dots: true,
215        arrows: false,
216        slidesToShow: 1,
217    });
218
219    //スライダー(中央拡大)
220    $('.c-slick-zoom').slick({
221        autoplay: false,
222        dots: false,
223        centerMode: true,
224        centerPadding: '30.5%',
225        slidesToShow: 1,
226        responsive: [{
227            breakpoint: 769, // 768px以下のサイズに適用
228            settings: {
229                slidesToShow: 1,
230                centerPadding: '10%',
231            },
232        }, ],
233    });
234});
235
236function smoothScroll(target){
237    var speed = 1000;
238    var position = $(target).offset().top;
239    $("body,html").animate({ scrollTop: position }, speed, "swing");
240}
241
242/*スムーススクロール*/
243var headerHeight = $('.l-header').outerHeight();
244// ページ外のアンカーへスクロール
245var urlHash = location.hash;
246if (urlHash) {
247    var target = $(urlHash);
248    var position = target.offset().top - headerHeight;
249    smoothScroll(target);
250}
251
252
253//スムーススクロール 別ページ内リンク
254$(window).on('load', function() {
255    let headerHeight = $('.l-header').outerHeight();
256    let urlHash = location.hash;
257    if (urlHash) {
258        let position = $(urlHash).offset().top - headerHeight;
259        $('html, body').animate({ scrollTop: position }, 0);
260    }
261});
262
263/*グローバルナビ*/
264$('.p-gnav__sign').click(function () {
265    $(this).toggleClass('is-open');
266    $(this).next('.p-gnav__list--second').slideToggle();
267});
268
269
270/*就職内々定者インタビュー*/
271$(function(){
272	var contentsCount = $(".p-career-program__item").length;
273	var n = 2;
274
275	if(contentsCount <= n) {
276		$(".p-career-program__btn").hide();
277	} else {
278		$(".p-career-program__item").slice(n).hide();
279
280		$(".p-career-program__btn").click(function(){
281			if ($(".p-career-program__item").slice(n).is(':hidden')) {
282				$(".p-career-program__item").slice(n).slideDown();
283				$(this).text('閉じる −');
284			} else {
285				$(".p-career-program__item").slice(n).slideUp();
286				$(this).text('もっと見る +');
287			}
288		});
289	}
290});
291
292/* oc 追従バナー */
293$(function() {
294    $(window).scroll(function () {
295        var banner = $('.p-oc-template-scroll-banner');
296        var off = $('.l-footer').offset();
297        if ($(this).scrollTop() > off.top -600) {
298            banner.fadeOut();
299        } else {
300            banner.fadeIn();
301        }
302    })
303});
304
305
306// モーダル(ポップアップ)
307const modalWindow = document.getElementById('js_modalWrap');
308const modalClose = document.getElementById('js_modalClose');
309const modalBG = document.getElementById('js_modalBG');
310
311if (!sessionStorage.getItem('visited')) {
312    sessionStorage.setItem('visited', 'first');
313    window.addEventListener('load', function () {
314        modalWindow.classList.add('active');
315    });
316} else {
317    window.addEventListener('load', function () {
318        modalWindow.classList.remove('active');
319    });
320}
321
322modalBG.addEventListener('click', function () {
323    modalWindow.classList.add('active2');
324    setTimeout(function () {
325        modalWindow.classList.remove('active');
326        modalWindow.classList.remove('active2');
327    }, 300);
328})
329modalClose.addEventListener('click', function () {
330    modalWindow.classList.add('active2');
331    setTimeout(function () {
332        modalWindow.classList.remove('active');
333        modalWindow.classList.remove('active2');
334    }, 300);
335})

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.