PageSourceSearch

https://www.shop-onoya.com/js/usr/top_slick_init.js?456

js shop-onoya.com collected 2026-10-09 00:19:29 UTC 2,013 bytes, 91 lines download raw bytes

1(function(){
2  // jQuery defer前提:実行時点で jQuery がまだなら待つ
3  function ready(fn){
4    if (window.jQuery) fn(window.jQuery);
5    else setTimeout(function(){ ready(fn); }, 30);
6  }
7
8  ready(function(jQuery){
9
10    function initTopSlick(){
11      var $wrap = jQuery('#top-slider');
12      if(!$wrap.length) return;
13
14      // slick未読込なら待つ(順序ミス/キャッシュ遅延対策)
15      if(typeof $wrap.slick !== 'function'){
16        setTimeout(initTopSlick, 50);
17        return;
18      }
19
20      // 二重初期化防止
21      if($wrap.hasClass('slick-initialized')) return;
22
23$wrap.slick({
24  infinite: true,
25  slidesToShow: 1,
26  slidesToScroll: 1,
27
28  centerMode: true,
29  centerPadding: '12%', // SP縦デフォルト
30
31  arrows: false,
32  dots: true,
33
34  autoplay: true,
35  autoplaySpeed: 3500,
36  speed: 550,
37  pauseOnHover: false,
38
39  swipe: true,
40  draggable: true,
41  touchMove: true,
42  swipeToSlide: false,
43  touchThreshold: 8,
44
45  adaptiveHeight: false,
46
47  responsive: [
48    {
49      breakpoint: 600,
50      settings: {
51        centerPadding: '6%'   // SP縦
52      }
53    },
54    {
55      breakpoint: 900,
56      settings: {
57        centerPadding: '20%'   // ★ SP横
58      }
59    },
60    {
61      breakpoint: 9999,
62      settings: {
63        centerPadding: '18%'   // PC
64      }
65    }
66  ]
67});
68
69
70
71      // 初期計算のズレ保険(画像ロード直後の再計算)
72      setTimeout(function(){
73        $wrap.slick('setPosition');
74      }, 0);
75    }
76
77    // ★画像サイズ確定後に初期化(deferでもこれなら安定)
78    jQuery(window).on('load', function(){
79      initTopSlick();
80    });
81
82    // リサイズでも再計算(横スクロールの原因になりにくい)
83    jQuery(window).on('resize', function(){
84      var $wrap = jQuery('#top-slider');
85      if($wrap.hasClass('slick-initialized')){
86        $wrap.slick('setPosition');
87      }
88    });
89
90  });
91})();

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.