PageSourceSearch

https://sanga-fc.jp/assets/js/common.js

js sanga-fc.jp collected 2026-10-02 02:52:05 UTC 7,950 bytes, 254 lines download raw bytes

1$(function(){
2    var pos = 0;
3    $(window).on('scroll', function(){
4        var scrollTop = $(window).scrollTop();
5        if ($(window).width() <= 768) {
6            if(scrollTop < 100){
7                $('#top header').css('top',0);
8                $('.top_btn___area').css('top',50);
9            } else {
10
11                if($(this).scrollTop() < pos ){
12                    $('#top header').css('top',0);
13                    $('.top_btn___area').css('top',50);
14                }else{
15                    $('#top header').css('top',-100);
16                    $('.top_btn___area').css('top',-50);
17                }
18                pos = $(this).scrollTop();
19            }
20        }
21    });
22});
23
24if (window.matchMedia( "(max-width: 988px)" ).matches) {
25    $(".gnav nav > ul > li").click(function () {
26        if ($(this).hasClass("active")) {
27            $(this).removeClass("active");
28            $(this).children(".gnav__box").slideToggle();
29        } else {
30            $(this).addClass("active");
31            $(this).children(".gnav__box").slideToggle();
32        }
33    });
34} else {
35    $(".gnav nav > ul > li").hover(function () {
36        $(this).children(".gnav__box").addClass("active");
37    }, function () {
38        $(this).children(".gnav__box").removeClass("active");
39    });
40}
41    
42
43$(function () {
44    $("#menu-btn-check").click(function () {
45        if ($("#menu-btn-check").prop("checked") == true) {
46            $(".gnav nav").show();
47        } else {
48            $(".gnav nav").hide();
49        }
50    });
51});
52
53$(function () {
54    $(".footer___gnav").click(function () {
55        if ($(this).hasClass("active")) {
56            $(this).removeClass("active");
57            $(this).children(".footer___box").slideToggle();
58        } else {
59            $(this).addClass("active");
60            $(this).children(".footer___box").slideToggle();
61        }
62    });
63});
64
65
66$('.news___tab li').click(function () {
67    $('.news___tab li').removeClass('active');
68    $('.news___list > div').removeClass('active');
69    $(this).addClass('active');
70    var tHref = $(this).children('a').attr('href');
71    var tID = tHref.slice(1);
72    $('#' + tID).addClass('active');
73});
74
75var pArrow = '<div><img src="/assets/img/common/left_slide_arrow.svg" alt="Prev" class="slick-prev"></div>';
76var nArrow = '<div><img src="/assets/img/common/right_slide_arrow.svg" alt="Next" class="slick-next"”"></div>';
77
78$('.news___thumbnail').slick({
79    asNavFor:'.news___slider',
80    prevArrow:'<div><svg xmlns="http://www.w3.org/2000/svg" width="10.305" height="25.824"><path d="M8.805 0a1.493 1.493 0 0 1 .806.236 1.5 1.5 0 0 1 .457 2.071L3.281 12.942l6.773 10.572a1.5 1.5 0 0 1-.449 2.072 1.5 1.5 0 0 1-2.072-.454L.237 13.753a1.5 1.5 0 0 1 0-1.616L7.541.693A1.5 1.5 0 0 1 8.805 0Z" fill="#a0a0a0"/></svg></div>',
81    nextArrow:'<div><svg xmlns="http://www.w3.org/2000/svg" width="10.305" height="25.824"><path d="M1.495 25.826a1.5 1.5 0 0 1-1.263-2.307l6.789-10.635L.247 2.312A1.5 1.5 0 1 1 2.773.694l7.291 11.38a1.5 1.5 0 0 1 0 1.616l-7.3 11.444a1.5 1.5 0 0 1-1.269.692Z" fill="#a0a0a0"/></svg></div>',
82    centerMode:true,
83    variableWidth: true,
84    focusOnSelect: true,
85});
86
87top_w = $(window).width();
88if (top_w <= 988) {
89	
90    
91} else {
92}
93
94var width = $(window).width();
95if(width <= 988){
96    $('.news___slider').slick({
97        asNavFor:'.news___thumbnail',
98        slidesToShow: 1,
99        slidesToScroll: 3,
100        autoplay: true,
101        cssEase: 'ease',
102        speed: 600,
103        autoplaySpeed: 5000,
104        centerMode:true,
105        centerPadding: '30px',
106        dots:true,
107        variableWidth :true,
108        prevArrow:pArrow,
109        nextArrow:nArrow,
110    });
111} else {
112}
113
114$(window).on('resize orientationchange', function() {
115    $('.news___thumbnail').slick('resize');
116    var width = $(window).width();
117    if(width <= 988){
118        $('.news___slider').slick({
119            asNavFor:'.news___thumbnail',
120            slidesToShow: 1,
121            slidesToScroll: 3,
122            autoplay: true,
123            cssEase: 'ease',
124            speed: 600,
125            autoplaySpeed: 5000,
126            centerMode:true,
127            centerPadding: '30px',
128            dots:true,
129            variableWidth :true,
130            prevArrow:pArrow,
131            nextArrow:nArrow,
132        });
133    } else {
134        $('.news___slider').slick('unslick');
135    }
136});
137
138
139//ticketBox Slider
140if ($('.ticketSlider').length) {
141
142    var pArrow = '<div><img src="/assets/img/common/left_slide_arrow_bk.svg" alt="Prev" class="slick-prev"></div>';
143    var nArrow = '<div><img src="/assets/img/common/right_slide_arrow_bk.svg" alt="Next" class="slick-next"></div>';
144
145    var ticketSliderOpt = {
146        infinite: false,
147        lazyLoad: 'progressive',
148        slidesToShow: 2,
149        autoplay: false,
150        cssEase: 'ease',
151        speed: 600,
152        dots: false,
153        arrows: false,
154        prevArrow: pArrow,
155        nextArrow: nArrow,
156        responsive: [{
157            breakpoint: 768,
158            settings: {
159                slidesToShow: 1,
160                dots: true,
161                arrows: true
162            }
163        }]
164    }
165    //モーダル版でなければ、Slick!
166    $('.ticketSlider').not('.typeModal').slick(ticketSliderOpt);
167
168    //モーダル版があれば
169    if (typeof $('.ticketSearchModal').data('remodal-id') !== 'undefined') {
170        //開いたときにSlick!
171        $(document).on('opened', '.remodal', function () {
172            //もし適用済であれば、一旦解除し、適用
173            if ($(this).find('.ticketSlider').hasClass('slick-initialized')) {
174                $(this).find('.ticketSlider').slick('unslick');
175            }
176            $(this).find('.ticketSlider.typeModal').slick(ticketSliderOpt);
177        })
178    }
179}
180
181$('.header_search_btn').click(function () {
182    $('.header_search').slideToggle();
183});
184
185$(function () {
186	'use strict';
187	//tab
188	$('.tab .item').click(function () {
189		//リセット
190		$(this).parent('.tab').find('.item').removeClass('active');
191		$(this).parent('.tab').parent('.tabHead').next().find('.tabTargetBox').removeClass('active');
192		//クリックされた場所を検知
193		let index = $(this).index();
194		//表示
195		$(this).addClass('active');
196		$(this).parent('.tab').parent('.tabHead').next().find('.tabTargetBox').eq(index).addClass('active');
197
198		if (index == 1) {
199			playerCommentShow();
200		}
201	});
202});
203
204
205$(function () {
206    $(".aco_btn").click(function () {
207        if ($(this).hasClass('active')) {
208            $(this).removeClass('active');
209        } else {
210            $(this).addClass('active');
211        }
212        $(this).next().slideToggle();
213    });
214});
215
216$(function () {
217    if ($('.pia-ticket-code').length > 0) {
218        $.each($('.pia-ticket-code'), function (index,value) {
219            $that = $(value);
220            var code = $that.text();
221            var id = $that.attr('id');
222            $.ajax('/api/tickets/v1',
223                {
224                    type: 'get',
225                    data: {code: code},
226                    dataType: 'html'
227                })
228                .done(function (data) {
229                    // $that.after(data);
230                })
231                .fail(function() {
232                    console.log('データの取得に失敗しました。');
233                });
234        });
235    }
236    if ( $('.pia-ticket-module').data('event_code') ) {
237        $.each($('.pia-ticket-module'), function (index,value) {
238            $that = $(value);
239            var code = $that.data('event_code');
240            var pia_id = $that.attr('id');
241            $.ajax('/api/tickets/v1',
242                {
243                    type: 'get',
244                    data: {code: code},
245                    dataType: 'html'
246                }).done(function (data) {
247                $('#' + pia_id).append(data);
248            })
249                .fail(function() {
250                    console.log('データの取得に失敗しました。');
251                });
252        });
253    }
254});

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.