PageSourceSearch

https://mypage.zenplace.co.jp/js/script.js

js zenplace.co.jp collected 2026-09-29 22:32:47 UTC 3,820 bytes, 158 lines download raw bytes

1var active = "is--active";
2
3function modalOpen(url, params= {}, callback) {
4  var options = {
5    duration: 500,
6    display: "block",
7    easing: "easeIn",
8    complete: function() {
9      $("html").css("overflow", "hidden")
10      // $(window).on("touchmove.noScroll", function(a) {
11      //   a.preventDefault()
12      // })
13    }
14  };
15  if (params.animate==false) {
16    options.duration = 0;
17  }
18  $(url).velocity({ opacity: 1 }, options );
19}
20
21function modalClose(target, callback) {
22  $(target).velocity({
23    opacity: 0
24  }, {
25    duration: 300,
26    display: "none",
27    easing: "easeOut",
28    complete: function() {
29      $("html").css("overflow", "auto")
30      // $(window).off(".noScroll")
31    }
32  })
33}
34
35function tableHeaderFixed(del) {
36  var table = $('.js-header-fixed');
37  if (table.length) {
38
39    //スクロールされたら追従
40    $(window).scroll(function() {
41
42      //追従用DOM生成
43      $('table.sc_head_clone').remove();
44      table.before("<table class='table-schedule__body table-schedule__body--type_fixed sc_head_clone'>" + table.find("thead").html() + "</table>");
45      //幅を追加
46      $(".table-schedule__body--type_fixed").css("width", table.width())
47      var tablefixed = $('.table-schedule__body--type_fixed');
48      var table_pos = table.offset().top;
49      var timer = null;
50
51      //重くならないための時限処理
52      clearTimeout(timer);
53      timer = setTimeout(function() {
54        if ($(this).scrollTop() > table_pos) {
55          tablefixed.addClass(active);
56        } else {
57          tablefixed.removeClass(active);
58        }
59      }, 10);
60    });
61  }
62}
63
64$(function() {
65  //モーダル
66  $(document).on("click", ".js-modal", function(e) {
67    e.preventDefault();
68    var url = $(this).attr("href")
69    modalOpen(url);
70  })
71  //モーダル削除
72  $(document).on("click", ".js-modal-close", function(e) {
73    e.preventDefault();
74    var target = $(".nav-modal");
75    modalClose(target)
76  })
77  //class toggle
78  $(document).on("click", ".js-class-toggle", function(e) {
79    e.preventDefault();
80    var target = $(this);
81    target.toggleClass(active)
82  })
83
84  $(document).on("click", ".js-accordion", function(e) {
85    e.preventDefault();
86    var header = $(this);
87    var target = $(this).next();
88
89    if (target.is(':visible')) {
90      $(target).velocity(("slideUp"), {
91        duration: 400,
92        easing: "easeIn",
93        complete: function() {
94          header.removeClass(active);
95          target.removeClass(active);
96        }
97      })
98    } else {
99      $(target).velocity(("slideDown"), {
100        duration: 200,
101        easing: "easeIn",
102        complete: function() {
103          header.addClass(active);
104          target.addClass(active);
105        }
106      })
107    }
108  })
109
110  //ページ遷移時 サクセス表示
111  if (location.hash == "#success") {
112    $("#success").addClass(active)
113  }
114
115  //ページ遷移時 エラー表示
116  if (location.hash == "#error") {
117    $("#error").addClass(active)
118  }
119
120  //スケジュール日付ヘッダ追従
121  tableHeaderFixed();
122  
123  
124  //ドロワーメニュー
125  $(".js-drawer").on("click", function(e) {
126    e.preventDefault();
127    var nav = $("#js-drawer-menu")
128    nav.velocity({
129      right: 0
130    }, {
131      duration: 300,
132      easing: "easeIn",
133      complete: function() {
134        nav.toggleClass(active)
135        $(window).on('touchmove.noScroll', function(e) {
136            e.preventDefault();
137        });
138      }
139    })
140  })
141  //ドロワーメニュー(閉じる)
142  $("#js-drawer-overlay").on("click", function(e) {
143    e.preventDefault();
144    var nav = $("#js-drawer-menu")
145
146    nav.toggleClass(active)
147    nav.velocity({
148      right: "-100%"
149    }, {
150      duration: 200,
151      easing: "easeIn",
152      complete: function() {
153        $(window).off(".noScroll")
154      }
155    })
156  })
157  
158})

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.