Commit 89fee119 by o.kimura

JSのインデント調整

parent 85b5e3f5
$(function(){$(".p-faq-Q").on("click",function(){$(this).next().slideToggle(),$(this).toggleClass("active")});var s=$(".content"),a=$(".search__input").find("input[type=text]"),e=s.find("h4"),l=$(),i=[];e.each(function(){i.push($(this).text().replace(/\s{2,}/g," ").toLowerCase())}),a.on("keyup",function(){e.each(function(){l=$(this),l.html(l.html().replace(/<span class="highlight">([^<]+)<\/span>/gi,"$1"))});var c=$.trim(a.val()).toLowerCase();if(c.length)for(var n in i)if(l=e.eq(n),-1!=i[n].indexOf(c))l.html(l.html().replace(new RegExp(c+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')),l.parent().parent().css("display","block");else{l.parent().parent().css("display","none");var t=$("#sect1 .p-faq-Box").filter(":visible").length,f=$("#sect2 .p-faq-Box").filter(":visible").length,p=$("#sect3 .p-faq-Box").filter(":visible").length,o=$("#sect4 .p-faq-Box").filter(":visible").length,r=$("#sect5 .p-faq-Box").filter(":visible").length,d=$("#sect6 .p-faq-Box").filter(":visible").length;0==t?$("#faq-01").css("display","none"):$("#faq-01").css("display","block"),0==f?$("#faq-02").css("display","none"):$("#faq-02").css("display","block"),0==p?$("#faq-03").css("display","none"):$("#faq-03").css("display","block"),0==o?$("#faq-04").css("display","none"):$("#faq-04").css("display","block"),0==r?$("#faq-05").css("display","none"):$("#faq-05").css("display","block"),0==d?$("#faq-06").css("display","none"):$("#faq-06").css("display","block"),0==t&&0==f&&0==p&&0==o&&0==r&&0==d?$(".faq-notfound").css("display","block"):$(".faq-notfound").css("display","none")}else e.parent().parent().css("display","block"),$("#faq-01").css("display","block"),$("#faq-02").css("display","block"),$("#faq-03").css("display","block"),$("#faq-04").css("display","block"),$("#faq-05").css("display","block"),$("#faq-06").css("display","block")})}); $(function(){$(".p-faq-Q").on("click",function(){$(this).next().slideToggle(),$(this).toggleClass("active")});var e=$(".content"),t=$(".search__input").find("input[type=text]"),o=e.find("h4"),n=$(),i=[];o.each(function(){i.push($(this).text().replace(/\s{2,}/g," ").toLowerCase())}),t.on("keyup",function(){o.each(function(){n=$(this),n.html(n.html().replace(/<span class="highlight">([^<]+)<\/span>/gi,"$1"))});var s=$.trim(t.val()).toLowerCase();if(s.length)for(var a in i)if(n=o.eq(a),-1!=i[a].indexOf(s))n.html(n.html().replace(new RegExp(s+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')),n.parent().parent().css("display","block");else{n.parent().parent().css("display","none");var l=$("#sect1 .p-faq-Box").filter(":visible").length,c=$("#sect2 .p-faq-Box").filter(":visible").length,f=$("#sect3 .p-faq-Box").filter(":visible").length,r=$("#sect4 .p-faq-Box").filter(":visible").length,d=$("#sect5 .p-faq-Box").filter(":visible").length,u=$("#sect6 .p-faq-Box").filter(":visible").length;0==l?$("#faq-01").css("display","none"):$("#faq-01").css("display","block"),0==c?$("#faq-02").css("display","none"):$("#faq-02").css("display","block"),0==f?$("#faq-03").css("display","none"):$("#faq-03").css("display","block"),0==r?$("#faq-04").css("display","none"):$("#faq-04").css("display","block"),0==d?$("#faq-05").css("display","none"):$("#faq-05").css("display","block"),0==u?$("#faq-06").css("display","none"):$("#faq-06").css("display","block"),0==l&&0==c&&0==f&&0==r&&0==d&&0==u?$(".faq-notfound").css("display","block"):$(".faq-notfound").css("display","none")}else o.parent().parent().css("display","block"),$("#faq-01").css("display","block"),$("#faq-02").css("display","block"),$("#faq-03").css("display","block"),$("#faq-04").css("display","block"),$("#faq-05").css("display","block"),$("#faq-06").css("display","block")})});
\ No newline at end of file \ No newline at end of file
if($(function(){var e=function(){return{option:".c-nav-menu1 li",init:function(){var e=$(this.option),t=this;$(document).off("mouseenter.megaMenuOpen"),$(document).on("mouseenter.megaMenuOpen",this.option,function(){var n=$(this).data("target");return n||($(".c-nav2").hide(),e.removeClass("is-open")),!n||$(this).hasClass("is-open")?!1:(e.removeClass("is-open"),$(this).addClass("is-open"),$(".c-nav2").hide(),$(".c-nav2-"+n).fadeIn("normal"),$(document).off("mouseenter.megaMenuClose"),void t.menuClose())})},menuClose:function(){var e=$(this.option);$(document).on("mouseenter.megaMenuClose","div",function(t){$(t.target).hasClass("c-nav1")||$(t.target).parents(".c-nav")[0]||$(t.target).parents(".c-nav2")[0]||$(t.target).hasClass("c-nav2")||($(".c-nav2").hide(),$(".bg-nav").remove(),e.removeClass("is-open"),$(document).off("mouseenter.megaMenuClose"))})},destroy:function(){$(document).off("mouseenter.megaMenuOpen")}}}();e.init()}),$(window).on("load resize",function(){$(window).width()<=767?($(".menu-icon").off("click").on("click",function(){$(this).toggleClass("is-active"),$(this).parent().next().next().slideToggle()}),$(".nav-sp .c-nav-link1").off("click").on("click",function(){$(this).hasClass("open")?($(this).removeClass("open"),$(this).next().slideToggle()):($(this).addClass("open"),$(this).next().slideToggle())}),$(".c-footer__list >li > .showSp").off("click").on("click",function(e){e.preventDefault(),$(this).next(".c-footer__listsub").slideToggle()}),$(".c-nav2").removeAttr("style")):($(".menu-icon").off("click"),$(".menu-icon").removeClass("is-active"),$(".nav-sp").removeAttr("style"),$(".nav-sp .c-nav-link1").off("click"),$(".nav-sp .c-navSP").removeAttr("style"),$(".c-footer__list >li > .showSp").off("click"),$(".c-footer__listsub").removeAttr("style"))}),$(".c-toTop").length){var scrollTrigger=10,backToTop=function(){var e=$(window).scrollTop();e>scrollTrigger?$(".c-toTop").fadeIn():$(".c-toTop").fadeOut()};backToTop(),$(window).on("scroll",function(){backToTop()}),$(".c-toTop").on("click",function(e){e.preventDefault(),$("html,body").animate({scrollTop:0},400)})}jQuery(document).ready(function(){$(".box-video").click(function(){$("iframe",this)[0].src+="&amp;autoplay=1",$(this).addClass("open")})}),$(function(){$(".tab").click(function(){$(".is-active").removeClass("is-active"),$(this).addClass("is-active"),$(".is-show").removeClass("is-show");const e=$(this).index();$(".tabCont").eq(e).addClass("is-show"),$(window).scroll()})}),$(function(){$("a.btn--stop ,.reserveStop a").click(function(){return!1})}),$(function(){var e=navigator.userAgent;if(e.indexOf("iPhone")>0||e.indexOf("Android")>0&&e.indexOf("Mobile")>0);else{var t=$(window),o=$("header").clone().addClass("fixed-nav").appendTo("body"),n="is-show";t.on("load scroll",function(){var e=$(this).scrollTop();e>300?o.addClass(n):o.removeClass(n)})}var i=50,s=100;$('a[href^="#"]').click(function(){var e=navigator.userAgent;if(e.indexOf("iPhone")>0||e.indexOf("Android")>0&&e.indexOf("Mobile")>0){var t=$(this).attr("href"),o=$("#"==t||""==t?"html":t),n=o.offset().top-s;return $("html, body").animate({scrollTop:n},500,"swing"),!1}var t=$(this).attr("href"),o=$("#"==t||""==t?"html":t),n=o.offset().top-i;return $("html, body").animate({scrollTop:n},500,"swing"),!1}),$(".sv").on("mouseover",function(){$(this).addClass("c-nav-sab-active")}),$(".sv").on("mouseout",function(){$(this).removeClass("c-nav-sab-active")})}),function(e){e.fn.fixMe=function(){return this.each(function(){function n(){o=t.clone(),o.find("tbody").remove().end().addClass("fixed").insertBefore(t),i()}function i(){o.width(t.outerWidth()),o.find("th").each(function(o){e(this).css("width",t.find("th").eq(o).outerWidth()+"px")})}function s(){var n=e(this).scrollTop(),i=e(this).scrollLeft(),s=e(".header").height();tableOffsetTop=t.offset().top-s,tableOffsetBottom=tableOffsetTop+t.height()-t.find("thead").height(),tableOffsetLeft=t.offset().left,tableOffsetTop>n||n>tableOffsetBottom?o.hide():n>=tableOffsetTop&&tableOffsetBottom>=n&&o.is(":hidden")&&o.show(),o.css({left:tableOffsetLeft-i+"px",top:s})}var o,t=e(this);e(window).resize(i),e(window).scroll(s),n()})}}(jQuery),$(window).on("load",function(){screen.width>767&&$(".schedule-table").fixMe()}),jQuery(window).load(function(){function e(){$("#seminar").trigger("click"),jQuery("html, body").animate({scrollTop:0},0)}""!=window.location.hash&&e(window.location.hash.substr(1))}),$(function(){$(".page-schedule .c-nav-link1, .c-footer__list li a").on("click",function(){$("#seminar").trigger("click")}),$(".search__input").submit(function(e){e.preventDefault()})}); if($(function(){var e=function(){return{option:".c-nav-menu1 li",init:function(){var e=$(this.option),t=this;$(document).off("mouseenter.megaMenuOpen"),$(document).on("mouseenter.megaMenuOpen",this.option,function(){var n=$(this).data("target");return n||($(".c-nav2").hide(),e.removeClass("is-open")),!n||$(this).hasClass("is-open")?!1:(e.removeClass("is-open"),$(this).addClass("is-open"),$(".c-nav2").hide(),$(".c-nav2-"+n).fadeIn("normal"),$(document).off("mouseenter.megaMenuClose"),void t.menuClose())})},menuClose:function(){var e=$(this.option);$(document).on("mouseenter.megaMenuClose","div",function(t){$(t.target).hasClass("c-nav1")||$(t.target).parents(".c-nav")[0]||$(t.target).parents(".c-nav2")[0]||$(t.target).hasClass("c-nav2")||($(".c-nav2").hide(),$(".bg-nav").remove(),e.removeClass("is-open"),$(document).off("mouseenter.megaMenuClose"))})},destroy:function(){$(document).off("mouseenter.megaMenuOpen")}}}();e.init()}),$(window).on("load resize",function(){$(window).width()<=767?($(".menu-icon").off("click").on("click",function(){$(this).toggleClass("is-active"),$(this).parent().next().next().slideToggle()}),$(".nav-sp .c-nav-link1").off("click").on("click",function(){$(this).hasClass("open")?($(this).removeClass("open"),$(this).next().slideToggle()):($(this).addClass("open"),$(this).next().slideToggle())}),$(".c-footer__list >li > .showSp").off("click").on("click",function(e){e.preventDefault(),$(this).next(".c-footer__listsub").slideToggle()}),$(".c-nav2").removeAttr("style")):($(".menu-icon").off("click"),$(".menu-icon").removeClass("is-active"),$(".nav-sp").removeAttr("style"),$(".nav-sp .c-nav-link1").off("click"),$(".nav-sp .c-navSP").removeAttr("style"),$(".c-footer__list >li > .showSp").off("click"),$(".c-footer__listsub").removeAttr("style"))}),$(".c-toTop").length){var scrollTrigger=10,backToTop=function(){var e=$(window).scrollTop();e>scrollTrigger?$(".c-toTop").fadeIn():$(".c-toTop").fadeOut()};backToTop(),$(window).on("scroll",function(){backToTop()}),$(".c-toTop").on("click",function(e){e.preventDefault(),$("html,body").animate({scrollTop:0},400)})}jQuery(document).ready(function(){$(".box-video").click(function(){$("iframe",this)[0].src+="&amp;autoplay=1",$(this).addClass("open")})}),$(function(){$(".tab").click(function(){$(".is-active").removeClass("is-active"),$(this).addClass("is-active"),$(".is-show").removeClass("is-show");const e=$(this).index();$(".tabCont").eq(e).addClass("is-show"),$(window).scroll()})}),$(function(){$("a.btn--stop ,.reserveStop a").click(function(){return!1})}),$(function(){var e=navigator.userAgent;if(e.indexOf("iPhone")>0||e.indexOf("Android")>0&&e.indexOf("Mobile")>0);else{var t=$(window),o=$("header").clone().addClass("fixed-nav").appendTo("body"),n="is-show";t.on("load scroll",function(){var e=$(this).scrollTop();e>300?o.addClass(n):o.removeClass(n)})}var i=50,s=100;$("a[href^=#]").click(function(){var e=navigator.userAgent;if(e.indexOf("iPhone")>0||e.indexOf("Android")>0&&e.indexOf("Mobile")>0){var t=$(this).attr("href"),o=$("#"==t||""==t?"html":t),n=o.offset().top-s;return $("html, body").animate({scrollTop:n},500,"swing"),!1}var t=$(this).attr("href"),o=$("#"==t||""==t?"html":t),n=o.offset().top-i;return $("html, body").animate({scrollTop:n},500,"swing"),!1}),$(".sv").on("mouseover",function(){$(this).addClass("c-nav-sab-active")}),$(".sv").on("mouseout",function(){$(this).removeClass("c-nav-sab-active")})}),function(e){e.fn.fixMe=function(){return this.each(function(){function n(){o=t.clone(),o.find("tbody").remove().end().addClass("fixed").insertBefore(t),i()}function i(){o.width(t.outerWidth()),o.find("th").each(function(o){e(this).css("width",t.find("th").eq(o).outerWidth()+"px")})}function s(){var n=e(this).scrollTop(),i=e(this).scrollLeft(),s=e(".header").height();tableOffsetTop=t.offset().top-s,tableOffsetBottom=tableOffsetTop+t.height()-t.find("thead").height(),tableOffsetLeft=t.offset().left,tableOffsetTop>n||n>tableOffsetBottom?o.hide():n>=tableOffsetTop&&tableOffsetBottom>=n&&o.is(":hidden")&&o.show(),o.css({left:tableOffsetLeft-i+"px",top:s})}var o,t=e(this);e(window).resize(i),e(window).scroll(s),n()})}}(jQuery),$(window).on("load",function(){screen.width>767&&$(".schedule-table").fixMe()}),jQuery(window).load(function(){function e(){$("#seminar").trigger("click"),jQuery("html, body").animate({scrollTop:0},0)}""!=window.location.hash&&e(window.location.hash.substr(1))}),$(function(){$(".page-schedule .c-nav-link1, .c-footer__list li a").on("click",function(){$("#seminar").trigger("click")}),$(".search__input").submit(function(e){e.preventDefault()})});
\ No newline at end of file \ No newline at end of file
/* ---------------------------------------------------------- /* ----------------------------------------------------------
common.js common.js
---------------------------------------------------------- */ ---------------------------------------------------------- */
var deviceMode = {}; var deviceMode = {};
var breakPoint = 768; var breakPoint = 768;
var newWidth = $(window).width(); var newWidth = $(window).width();
var oldWidth = newWidth; var oldWidth = newWidth;
var getDeviceMode = function () { var getDeviceMode = function () {
if (breakPoint < $(window).width()) { if (breakPoint < $(window).width()) {
var dm = "pc"; var dm = "pc";
} else { } else {
var dm = "sp"; var dm = "sp";
} }
return dm; return dm;
} }
//(function($) { //(function($) {
$(document).ready(function () { $(document).ready(function () {
var wid = $(window).width(); var wid = $(window).width();
deviceMode['new'] = getDeviceMode(); deviceMode['new'] = getDeviceMode();
deviceMode['old'] = deviceMode['new']; deviceMode['old'] = deviceMode['new'];
$(window).load(function () { $(window).load(function () {
$(window).triggerHandler('loadDevice', deviceMode); $(window).triggerHandler('loadDevice', deviceMode);
}); });
smoothscroll(); smoothscroll();
selectBox(); selectBox();
headSearch(); headSearch();
faqAccordion(); faqAccordion();
pagetop(); pagetop();
if (!isPhone()) { if (!isPhone()) {
$("a[href^='tel:']").click(function (event) { $("a[href^='tel:']").click(function (event) {
return false; return false;
}); });
} }
}); });
//})(jQuery); //})(jQuery);
$(window).on('resize orientationchange', function () { $(window).on('resize orientationchange', function () {
newWidth = $(window).width(); newWidth = $(window).width();
if (newWidth !== oldWidth) { if (newWidth !== oldWidth) {
deviceMode['new'] = getDeviceMode(); deviceMode['new'] = getDeviceMode();
} }
//デバイスが変わっているかをチェック //デバイスが変わっているかをチェック
if (deviceMode['new'] != deviceMode['old']) { if (deviceMode['new'] != deviceMode['old']) {
$(window).triggerHandler('changeDevice', deviceMode); $(window).triggerHandler('changeDevice', deviceMode);
} }
deviceMode['old'] = deviceMode['new']; deviceMode['old'] = deviceMode['new'];
oldWidth = newWidth; oldWidth = newWidth;
}); });
$(window).on('loadDevice changeDevice', function (e, deviceMode) { $(window).on('loadDevice changeDevice', function (e, deviceMode) {
if (deviceMode['new'] === 'pc') { if (deviceMode['new'] === 'pc') {
myAccordion.destroy(); myAccordion.destroy();
megaMenu.init(); megaMenu.init();
spMenu.destroy(); spMenu.destroy();
alignHeight.init(); alignHeight.init();
} else if (deviceMode['new'] === 'sp') { } else if (deviceMode['new'] === 'sp') {
myAccordion.init(); myAccordion.init();
spMenu.init(); spMenu.init();
alignHeight.destroy(); alignHeight.destroy();
} }
}); });
function headSearch() { function headSearch() {
var $triger = $(".btn-search"); var $triger = $(".btn-search");
$triger.on('click', function (event) { $triger.on('click', function (event) {
event.preventDefault(); event.preventDefault();
var $target = $(this).siblings('.btn-contact-search'); var $target = $(this).siblings('.btn-contact-search');
if ($(this).closest('.mod-header-contact').hasClass('is-search')) { if ($(this).closest('.mod-header-contact').hasClass('is-search')) {
if ($target.find("input").val() == "") { if ($target.find("input").val() == "") {
$(this).closest('.mod-header-contact').removeClass('is-search'); $(this).closest('.mod-header-contact').removeClass('is-search');
return false; return false;
} }
$target.find("form").submit(); $target.find("form").submit();
} else { } else {
$(this).closest('.mod-header-contact').addClass('is-search'); $(this).closest('.mod-header-contact').addClass('is-search');
$target.find("input").focus(); $target.find("input").focus();
} }
/* Act on the event */ /* Act on the event */
}); });
} }
var myAccordion = (function () { var myAccordion = (function () {
return { return {
option: '.box-footer-navi h2', option: '.box-footer-navi h2',
init: function () { init: function () {
var $trigger = $(this.option); var $trigger = $(this.option);
$trigger.on('click', function (event) { $trigger.on('click', function (event) {
if ($(this).next("ul")[0]) event.preventDefault(); if ($(this).next("ul")[0]) event.preventDefault();
/* Act on the event */ /* Act on the event */
$(this).next("ul").slideToggle("normal"); $(this).next("ul").slideToggle("normal");
$(this).toggleClass('is-open'); $(this).toggleClass('is-open');
}); });
}, },
destroy: function () { destroy: function () {
var $trigger = $(this.option); var $trigger = $(this.option);
$trigger.next("ul").css("display", ""); $trigger.next("ul").css("display", "");
$trigger.removeClass('is-open'); $trigger.removeClass('is-open');
$trigger.off(); $trigger.off();
} }
} }
}()); }());
var megaMenu = (function () { var megaMenu = (function () {
return { return {
option: '.nav-global li', option: '.nav-global li',
init: function () { init: function () {
var $trigger = $(this.option); var $trigger = $(this.option);
var $this = this; var $this = this;
$(document).off("mouseenter.megaMenuOpen"); $(document).off("mouseenter.megaMenuOpen");
$(document).on("mouseenter.megaMenuOpen", this.option, function (event) { $(document).on("mouseenter.megaMenuOpen", this.option, function (event) {
var $target = $(this).data("target"); var $target = $(this).data("target");
if (!$target) { if (!$target) {
$(".nav-global-submenu").hide(); $(".nav-global-submenu").hide();
$(".bg-nav").remove(); $(".bg-nav").remove();
$trigger.removeClass('is-open'); $trigger.removeClass('is-open');
} }
if (!$target || $(this).hasClass('is-open')) return false; if (!$target || $(this).hasClass('is-open')) return false;
$trigger.removeClass('is-open'); $trigger.removeClass('is-open');
$(this).addClass('is-open'); $(this).addClass('is-open');
if (!$(".bg-nav")[0]) $(".header").append($('<div>', { 'class': 'bg-nav' })); if (!$(".bg-nav")[0]) $(".header").append($('<div>', {
$(".nav-global-submenu").hide(); 'class': 'bg-nav'
$(".nav-global-submenu-" + $target).fadeIn('normal'); }));
$(document).off("mouseenter.megaMenuClose"); $(".nav-global-submenu").hide();
$this.menuClose(); $(".nav-global-submenu-" + $target).fadeIn('normal');
}); $(document).off("mouseenter.megaMenuClose");
$this.menuClose();
});
},
menuClose: function () {
var $trigger = $(this.option); },
var $this = this; menuClose: function () {
$(document).on("mouseenter.megaMenuClose", "div", function (event) { var $trigger = $(this.option);
if (!$(event.target).hasClass("header-main") && !$(event.target).parents(".header-main")[0] && !$(event.target).parents(".nav-global-submenu")[0] && !$(event.target).hasClass("nav-global-submenu")) { var $this = this;
$(".nav-global-submenu").hide(); $(document).on("mouseenter.megaMenuClose", "div", function (event) {
$(".bg-nav").remove(); if (!$(event.target).hasClass("header-main") && !$(event.target).parents(".header-main")[0] && !$(event.target).parents(".nav-global-submenu")[0] && !$(event.target).hasClass("nav-global-submenu")) {
$trigger.removeClass('is-open'); $(".nav-global-submenu").hide();
$(document).off("mouseenter.megaMenuClose"); $(".bg-nav").remove();
} $trigger.removeClass('is-open');
}); $(document).off("mouseenter.megaMenuClose");
}, }
destroy: function () { });
$(document).off("mouseenter.megaMenuOpen"); },
} destroy: function () {
} $(document).off("mouseenter.megaMenuOpen");
}()); }
var spMenu = (function () { }
return { }());
option: { var spMenu = (function () {
"trigger": '.js-spmenu', return {
"target": '.nav-global-sp' option: {
}, "trigger": '.js-spmenu',
init: function () { "target": '.nav-global-sp'
var $trigger = $(this.option.trigger); },
var $target = $(this.option.target); init: function () {
$trigger.off('click'); var $trigger = $(this.option.trigger);
$trigger.on('click', function (event) { var $target = $(this.option.target);
event.preventDefault(); $trigger.off('click');
/* Act on the event */ $trigger.on('click', function (event) {
if ($trigger.hasClass('is-open')) { event.preventDefault();
$target.fadeOut('normal'); /* Act on the event */
$(this).removeClass('is-open'); if ($trigger.hasClass('is-open')) {
} else { $target.fadeOut('normal');
$target.fadeIn('normal'); $(this).removeClass('is-open');
$(this).addClass('is-open'); } else {
} $target.fadeIn('normal');
$(this).addClass('is-open');
}); }
$(".list-nav-global-sp h2").on('click', function (event) { });
event.preventDefault();
/* Act on the event */ $(".list-nav-global-sp h2").on('click', function (event) {
event.preventDefault();
$(this).next("div").slideToggle("normal"); /* Act on the event */
$(this).toggleClass('is-open');
}); $(this).next("div").slideToggle("normal");
}, $(this).toggleClass('is-open');
destroy: function () { });
var $trigger = $(this.option.trigger); },
var $target = $(this.option.target); destroy: function () {
$target.css("display", ""); var $trigger = $(this.option.trigger);
$trigger.next("ul").css("display", ""); var $target = $(this.option.target);
$trigger.removeClass('is-open'); $target.css("display", "");
$trigger.off(); $trigger.next("ul").css("display", "");
$(".list-nav-global-sp h2").off(); $trigger.removeClass('is-open');
} $trigger.off();
} $(".list-nav-global-sp h2").off();
}()); }
function selectBox() { }
//初期設定 }());
$(".mod-search-select select").change(function () {
$(this).next().html($("option:selected", this).text()); function selectBox() {
// //初期設定
}).trigger("change"); $(".mod-search-select select").change(function () {
$(".mod-search-select select").change(function () { $(this).next().html($("option:selected", this).text());
if ($(this).val() == "") return false; //
//$(this).parents("form").attr('action',$(this).val()); }).trigger("change");
window.location.href = $(this).val(); $(".mod-search-select select").change(function () {
//$(this).parents("form").submit(); if ($(this).val() == "") return false;
}); //$(this).parents("form").attr('action',$(this).val());
} window.location.href = $(this).val();
function faqAccordion() { //$(this).parents("form").submit();
if ($(".sec-faq")[0]) { });
$(".sec-faq dt").click(function (event) { }
/* Act on the event */
$("+dd", this).slideToggle(); function faqAccordion() {
}); if ($(".sec-faq")[0]) {
} $(".sec-faq dt").click(function (event) {
/* Act on the event */
} $("+dd", this).slideToggle();
});
// ページ上へボタン 180426現在chromeにて不具合 }
function pagetop() {
if ($(".btn-pagetop")[0]) { }
var scrollNum;
var defPos = 0; // ページ上へボタン 180426現在chromeにて不具合
$(window).scroll(function (event) { function pagetop() {
scrollNum = $(window).scrollTop(); if ($(".btn-pagetop")[0]) {
if (150 <= scrollNum) { var scrollNum;
$(".btn-pagetop").addClass('is-show'); var defPos = 0;
} else { $(window).scroll(function (event) {
$(".btn-pagetop").removeClass('is-show'); scrollNum = $(window).scrollTop();
} if (150 <= scrollNum) {
}); $(".btn-pagetop").addClass('is-show');
} else {
} $(".btn-pagetop").removeClass('is-show');
} }
});
// ページ上へボタン chrome対応版 180427↓
$(function () { }
var topBtn = $('#pageTop'); }
topBtn.hide();
$(window).scroll(function () { // ページ上へボタン chrome対応版 180427↓
if ($(this).scrollTop() > 150) { $(function () {
topBtn.fadeIn(); var topBtn = $('#pageTop');
} else { topBtn.hide();
topBtn.fadeOut(); $(window).scroll(function () {
} if ($(this).scrollTop() > 150) {
}); topBtn.fadeIn();
} else {
topBtn.click(function () { topBtn.fadeOut();
$('body,html').animate({ }
scrollTop: 0 });
}, 500);
return false; topBtn.click(function () {
}); $('body,html').animate({
}); scrollTop: 0
// 180427 firefoxにて最初からボタン出っ放し }, 500);
return false;
});
//要素の高さを揃える });
var alignHeight = (function () { // 180427 firefoxにて最初からボタン出っ放し
return {
option: { //要素の高さを揃える
parent: "-align", var alignHeight = (function () {
children: "-item"
}, return {
init: function () { option: {
var e = this.option; parent: "-align",
var elmP = $('[class*=' + e.parent + ']'); children: "-item"
if (elmP.length > 0) { },
alignHeight.changesize(e); init: function () {
$(window).on("resize.change", function () { var e = this.option;
$(window).trigger("changesize"); var elmP = $('[class*=' + e.parent + ']');
}); if (elmP.length > 0) {
$(window).on("changesize", function () { alignHeight.changesize(e);
alignHeight.changesize(); $(window).on("resize.change", function () {
}); $(window).trigger("changesize");
} });
}, $(window).on("changesize", function () {
reset: function () { alignHeight.changesize();
var e = this.option; });
var elmP = $('[class*=' + e.parent + ']'); }
var elmC = '[class$=' + e.children + ']'; },
elmP.find(elmC).css("height", ""); reset: function () {
}, var e = this.option;
changesize: function () { var elmP = $('[class*=' + e.parent + ']');
var e = this.option; var elmC = '[class$=' + e.children + ']';
var elmP = $('[class*=' + e.parent + ']'); elmP.find(elmC).css("height", "");
var elmC = '[class$=' + e.children + ']'; },
elmP.find(e.children).css("height", ""); changesize: function () {
elmP.each(function () { var e = this.option;
var maxHeight = 0; var elmP = $('[class*=' + e.parent + ']');
$(elmC, this).each(function () { var elmC = '[class$=' + e.children + ']';
if ($(this).outerHeight() > maxHeight) { elmP.find(e.children).css("height", "");
maxHeight = $(this).outerHeight(); elmP.each(function () {
} var maxHeight = 0;
}); $(elmC, this).each(function () {
$(elmC, this).css("height", maxHeight); if ($(this).outerHeight() > maxHeight) {
}); maxHeight = $(this).outerHeight();
}, }
destroy: function () { });
$(window).off("resize.change changesize"); $(elmC, this).css("height", maxHeight);
alignHeight.reset(); });
} },
destroy: function () {
}; $(window).off("resize.change changesize");
}()); alignHeight.reset();
}
//ページトップへスクロールする
function smoothscroll() { };
$('a[href^="#"]').click(function () { }());
var speed = 400; // ミリ秒
var href = $(this).attr("href"); //ページトップへスクロールする
var target = $(href == "#" || href == "" ? 'html' : href); function smoothscroll() {
var position = target.offset().top; //targetの位置を取得 $('a[href^="#"]').click(function () {
//$($.browser.safari ? 'body' : 'html').animate({scrollTop:position}, speed, 'swing'); var speed = 400; // ミリ秒
var body = 'body'; var href = $(this).attr("href");
var userAgent = window.navigator.userAgent.toLowerCase(); var target = $(href == "#" || href == "" ? 'html' : href);
if (userAgent.indexOf('msie') > -1 || userAgent.indexOf('trident') > -1 || userAgent.indexOf("firefox") > -1) { /*IE6.7.8.9.10.11*/ var position = target.offset().top; //targetの位置を取得
body = 'html'; //$($.browser.safari ? 'body' : 'html').animate({scrollTop:position}, speed, 'swing');
} var body = 'body';
position -= $(".header").height(); var userAgent = window.navigator.userAgent.toLowerCase();
$(body).animate({ if (userAgent.indexOf('msie') > -1 || userAgent.indexOf('trident') > -1 || userAgent.indexOf("firefox") > -1) {
scrollTop: position /*IE6.7.8.9.10.11*/
}, speed, 'swing'); body = 'html';
return false; }
}); position -= $(".header").height();
} $(body).animate({
scrollTop: position
function gMap(key, lat, lng) { }, speed, 'swing');
google.maps.event.addDomListener(window, 'load', function () { return false;
var mapdiv = document.getElementById(key); });
var myOptions = { }
zoom: 16,
center: new google.maps.LatLng(lat, lng), function gMap(key, lat, lng) {
mapTypeId: google.maps.MapTypeId.ROADMAP, google.maps.event.addDomListener(window, 'load', function () {
scaleControl: true, var mapdiv = document.getElementById(key);
scrollwheel: false var myOptions = {
}; zoom: 16,
var map = new google.maps.Map(mapdiv, myOptions); center: new google.maps.LatLng(lat, lng),
var styleOptions = [{ mapTypeId: google.maps.MapTypeId.ROADMAP,
'stylers': [{ scaleControl: true,
'gamma': 0.8 scrollwheel: false
}, { };
'saturation': -100 var map = new google.maps.Map(mapdiv, myOptions);
}, { var styleOptions = [{
'lightness': 20 'stylers': [{
}] 'gamma': 0.8
}] }, {
//var infoWindow = new google.maps.InfoWindow({context: ''}); 'saturation': -100
var styleType = new google.maps.StyledMapType(styleOptions); }, {
map.mapTypes.set('genius', styleType); 'lightness': 20
map.setMapTypeId('genius'); }]
function addMarker(point) { }]
//var infoWindow = new google.maps.InfoWindow({context: ''});
var marker = new google.maps.Marker({ var styleType = new google.maps.StyledMapType(styleOptions);
position: point, map.mapTypes.set('genius', styleType);
map: map, map.setMapTypeId('genius');
// shadow: shadow,
zIndex: 99 function addMarker(point) {
});
var marker = new google.maps.Marker({
google.maps.event.addListener(marker, 'click', function (event) { position: point,
// center map map: map,
map.panTo(marker.getPosition()); // shadow: shadow,
zIndex: 99
// open info window });
infoWindow.close();
infoWindow.setContent("<p style='font-size: 12px; text-align: center;'><span style='color: #000; font-size: 12px; font-weight: bold;'>お試し宿泊バー<br>神奈川県厚木市旭町3丁目11-14</span></p>"); google.maps.event.addListener(marker, 'click', function (event) {
// center map
infoWindow.open(map, marker); map.panTo(marker.getPosition());
});
return marker; // open info window
} infoWindow.close();
addMarker(new google.maps.LatLng(lat, lng)); infoWindow.setContent("<p style='font-size: 12px; text-align: center;'><span style='color: #000; font-size: 12px; font-weight: bold;'>お試し宿泊バー<br>神奈川県厚木市旭町3丁目11-14</span></p>");
});
} infoWindow.open(map, marker);
});
return marker;
// タブ切り替え(scheduleページ) }
$(function () { addMarker(new google.maps.LatLng(lat, lng));
$('.tab').click(function () { });
$('.is-active').removeClass('is-active'); }
$(this).addClass('is-active');
$('.is-show').removeClass('is-show');
const index = $(this).index(); // タブ切り替え(scheduleページ)
$('.tabCont').eq(index).addClass('is-show'); $(function () {
}); $('.tab').click(function () {
}); $('.is-active').removeClass('is-active');
$(this).addClass('is-active');
// リンク無効クラス $('.is-show').removeClass('is-show');
$(function () { const index = $(this).index();
$('a.btn--stop ,.reserveStop a').click(function () { $('.tabCont').eq(index).addClass('is-show');
return false; });
}) });
});
/*---------------------------- // リンク無効クラス
ブラウザ判定 $(function () {
----------------------------*/ $('a.btn--stop ,.reserveStop a').click(function () {
function checkBrowser() { return false;
})
var _ua = navigator.userAgent; });
var ret = ""; /*----------------------------
var isTab = (_ua.indexOf('iPhone') > 0 || _ua.indexOf('iPad') > 0 || _ua.indexOf('iPod') > 0 || _ua.indexOf('Android') > 0); ブラウザ判定
if (_ua.match(/Chrome/)) { ----------------------------*/
$('body').addClass("chrome"); function checkBrowser() {
ret = "chrome";
} else if (_ua.indexOf('Android') > 0) { var _ua = navigator.userAgent;
$('body').addClass("android"); var ret = "";
ret = "android"; var isTab = (_ua.indexOf('iPhone') > 0 || _ua.indexOf('iPad') > 0 || _ua.indexOf('iPod') > 0 || _ua.indexOf('Android') > 0);
} else if (_ua.match(/MSIE/)) { if (_ua.match(/Chrome/)) {
$('body').addClass("ie"); $('body').addClass("chrome");
var appVersion = window.navigator.appVersion; ret = "chrome";
if (appVersion.indexOf("MSIE 6.") != -1) { } else if (_ua.indexOf('Android') > 0) {
$('body').addClass("ie6"); $('body').addClass("android");
ret = "ie6"; ret = "android";
} else if (appVersion.indexOf("MSIE 7.") != -1) { } else if (_ua.match(/MSIE/)) {
$('body').addClass("ie7"); $('body').addClass("ie");
ret = "ie7"; var appVersion = window.navigator.appVersion;
} else if (appVersion.indexOf("MSIE 8.") != -1) { if (appVersion.indexOf("MSIE 6.") != -1) {
$('body').addClass("ie8"); $('body').addClass("ie6");
ret = "ie8"; ret = "ie6";
} else if (appVersion.indexOf("MSIE 9.") != -1) { } else if (appVersion.indexOf("MSIE 7.") != -1) {
$('body').addClass("ie9"); $('body').addClass("ie7");
ret = "ie9"; ret = "ie7";
} else if (appVersion.indexOf("MSIE 10.") != -1) { } else if (appVersion.indexOf("MSIE 8.") != -1) {
$('body').addClass("ie10"); $('body').addClass("ie8");
ret = "ie10"; ret = "ie8";
} } else if (appVersion.indexOf("MSIE 9.") != -1) {
} else if (_ua.match(/Trident/)) { $('body').addClass("ie9");
$('body').addClass("ie11"); ret = "ie9";
ret = "ie11"; } else if (appVersion.indexOf("MSIE 10.") != -1) {
} else if (_ua.match(/Firefox/)) { $('body').addClass("ie10");
$('body').addClass("firefox"); ret = "ie10";
ret = "firefox"; }
} else if (_ua.match(/Safari/)) { } else if (_ua.match(/Trident/)) {
$('body').addClass("safari"); $('body').addClass("ie11");
ret = "safari"; ret = "ie11";
} else if (_ua.match(/Opera/)) { } else if (_ua.match(/Firefox/)) {
$('body').addClass("opera"); $('body').addClass("firefox");
ret = "opera"; ret = "firefox";
} } else if (_ua.match(/Safari/)) {
return ret; $('body').addClass("safari");
} ret = "safari";
function isPhone() { } else if (_ua.match(/Opera/)) {
return (navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('Android') > 0); $('body').addClass("opera");
} ret = "opera";
}
/*---------------------------- return ret;
schedule scroll }
----------------------------*/
(function ($) { function isPhone() {
$.fn.fixMe = function () { return (navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('Android') > 0);
return this.each(function () { }
var $this = $(this),
$t_fixed; /*----------------------------
schedule scroll
function init() { ----------------------------*/
$t_fixed = $this.clone(); (function ($) {
$t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this); $.fn.fixMe = function () {
resizeFixed(); return this.each(function () {
} var $this = $(this),
$t_fixed;
function resizeFixed() {
$t_fixed.width($this.outerWidth()); function init() {
$t_fixed.find("th").each(function (index) { $t_fixed = $this.clone();
$(this).css("width", $this.find("th").eq(index).outerWidth() + "px"); $t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this);
}); resizeFixed();
} }
function scrollFixed() { function resizeFixed() {
var offsetY = $(this).scrollTop(), $t_fixed.width($this.outerWidth());
offsetX = $(this).scrollLeft(), $t_fixed.find("th").each(function (index) {
heightOfHeader = $('.header').height(); $(this).css("width", $this.find("th").eq(index).outerWidth() + "px");
tableOffsetTop = $this.offset().top - heightOfHeader, });
tableOffsetBottom = tableOffsetTop + $this.height() - $this.find("thead").height(), }
tableOffsetLeft = $this.offset().left;
if (offsetY < tableOffsetTop || offsetY > tableOffsetBottom) function scrollFixed() {
$t_fixed.hide(); var offsetY = $(this).scrollTop(),
else if (offsetY >= tableOffsetTop && offsetY <= tableOffsetBottom && $t_fixed.is(":hidden")) offsetX = $(this).scrollLeft(),
$t_fixed.show(); heightOfHeader = $('.header').height();
$t_fixed.css({ tableOffsetTop = $this.offset().top - heightOfHeader,
"left": tableOffsetLeft - offsetX + "px", tableOffsetBottom = tableOffsetTop + $this.height() - $this.find("thead").height(),
"top": heightOfHeader tableOffsetLeft = $this.offset().left;
}); if (offsetY < tableOffsetTop || offsetY > tableOffsetBottom)
} $t_fixed.hide();
else if (offsetY >= tableOffsetTop && offsetY <= tableOffsetBottom && $t_fixed.is(":hidden"))
$(window).resize(resizeFixed); $t_fixed.show();
$(window).scroll(scrollFixed); $t_fixed.css({
init(); "left": tableOffsetLeft - offsetX + "px",
}); "top": heightOfHeader
}; });
})(jQuery); }
$(window).on('load', function () { $(window).resize(resizeFixed);
if (screen.width > 767) { $(window).scroll(scrollFixed);
$(".schedule-table").fixMe(); init();
} });
}); };
\ No newline at end of file })(jQuery);
$(window).on('load', function () {
if (screen.width > 767) {
$(".schedule-table").fixMe();
}
});
function headSearch(){var e=$(".btn-search");e.on("click",function(e){e.preventDefault();var t=$(this).siblings(".btn-contact-search");if($(this).closest(".mod-header-contact").hasClass("is-search")){if(""==t.find("input").val())return $(this).closest(".mod-header-contact").removeClass("is-search"),!1;t.find("form").submit()}else $(this).closest(".mod-header-contact").addClass("is-search"),t.find("input").focus()})}function selectBox(){$(".mod-search-select select").change(function(){$(this).next().html($("option:selected",this).text())}).trigger("change"),$(".mod-search-select select").change(function(){return""==$(this).val()?!1:void(window.location.href=$(this).val())})}function faqAccordion(){$(".sec-faq")[0]&&$(".sec-faq dt").click(function(){$("+dd",this).slideToggle()})}function pagetop(){if($(".btn-pagetop")[0]){var e;$(window).scroll(function(){e=$(window).scrollTop(),e>=150?$(".btn-pagetop").addClass("is-show"):$(".btn-pagetop").removeClass("is-show")})}}function smoothscroll(){$('a[href^="#"]').click(function(){var e=400,t=$(this).attr("href"),n=$("#"==t||""==t?"html":t),o=n.offset().top,i="body",s=window.navigator.userAgent.toLowerCase();return(s.indexOf("msie")>-1||s.indexOf("trident")>-1||s.indexOf("firefox")>-1)&&(i="html"),o-=$(".header").height(),$(i).animate({scrollTop:o},e,"swing"),!1})}function gMap(e,t,n){google.maps.event.addDomListener(window,"load",function(){function c(e){var t=new google.maps.Marker({position:e,map:s,zIndex:99});return google.maps.event.addListener(t,"click",function(){s.panTo(t.getPosition()),infoWindow.close(),infoWindow.setContent("<p style='font-size: 12px; text-align: center;'><span style='color: #000; font-size: 12px; font-weight: bold;'>お試し宿泊バー<br>神奈川県厚木市旭町3丁目11-14</span></p>"),infoWindow.open(s,t)}),t}var o=document.getElementById(e),i={zoom:16,center:new google.maps.LatLng(t,n),mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:!0,scrollwheel:!1},s=new google.maps.Map(o,i),a=[{stylers:[{gamma:.8},{saturation:-100},{lightness:20}]}],l=new google.maps.StyledMapType(a);s.mapTypes.set("genius",l),s.setMapTypeId("genius"),c(new google.maps.LatLng(t,n))})}function checkBrowser(){{var e=navigator.userAgent,t="";e.indexOf("iPhone")>0||e.indexOf("iPad")>0||e.indexOf("iPod")>0||e.indexOf("Android")>0}if(e.match(/Chrome/))$("body").addClass("chrome"),t="chrome";else if(e.indexOf("Android")>0)$("body").addClass("android"),t="android";else if(e.match(/MSIE/)){$("body").addClass("ie");var o=window.navigator.appVersion;-1!=o.indexOf("MSIE 6.")?($("body").addClass("ie6"),t="ie6"):-1!=o.indexOf("MSIE 7.")?($("body").addClass("ie7"),t="ie7"):-1!=o.indexOf("MSIE 8.")?($("body").addClass("ie8"),t="ie8"):-1!=o.indexOf("MSIE 9.")?($("body").addClass("ie9"),t="ie9"):-1!=o.indexOf("MSIE 10.")&&($("body").addClass("ie10"),t="ie10")}else e.match(/Trident/)?($("body").addClass("ie11"),t="ie11"):e.match(/Firefox/)?($("body").addClass("firefox"),t="firefox"):e.match(/Safari/)?($("body").addClass("safari"),t="safari"):e.match(/Opera/)&&($("body").addClass("opera"),t="opera");return t}function isPhone(){return navigator.userAgent.indexOf("iPhone")>0||navigator.userAgent.indexOf("Android")>0}var deviceMode={},breakPoint=768,newWidth=$(window).width(),oldWidth=newWidth,getDeviceMode=function(){if(breakPoint<$(window).width())var e="pc";else var e="sp";return e};$(document).ready(function(){$(window).width();deviceMode["new"]=getDeviceMode(),deviceMode.old=deviceMode["new"],$(window).load(function(){$(window).triggerHandler("loadDevice",deviceMode)}),smoothscroll(),selectBox(),headSearch(),faqAccordion(),pagetop(),isPhone()||$("a[href^='tel:']").click(function(){return!1})}),$(window).on("resize orientationchange",function(){newWidth=$(window).width(),newWidth!==oldWidth&&(deviceMode["new"]=getDeviceMode()),deviceMode["new"]!=deviceMode.old&&$(window).triggerHandler("changeDevice",deviceMode),deviceMode.old=deviceMode["new"],oldWidth=newWidth}),$(window).on("loadDevice changeDevice",function(e,t){"pc"===t["new"]?(myAccordion.destroy(),megaMenu.init(),spMenu.destroy(),alignHeight.init()):"sp"===t["new"]&&(myAccordion.init(),spMenu.init(),alignHeight.destroy())});var myAccordion=function(){return{option:".box-footer-navi h2",init:function(){var e=$(this.option);e.on("click",function(e){$(this).next("ul")[0]&&e.preventDefault(),$(this).next("ul").slideToggle("normal"),$(this).toggleClass("is-open")})},destroy:function(){var e=$(this.option);e.next("ul").css("display",""),e.removeClass("is-open"),e.off()}}}(),megaMenu=function(){return{option:".nav-global li",init:function(){var e=$(this.option),t=this;$(document).off("mouseenter.megaMenuOpen"),$(document).on("mouseenter.megaMenuOpen",this.option,function(){var o=$(this).data("target");return o||($(".nav-global-submenu").hide(),$(".bg-nav").remove(),e.removeClass("is-open")),!o||$(this).hasClass("is-open")?!1:(e.removeClass("is-open"),$(this).addClass("is-open"),$(".bg-nav")[0]||$(".header").append($("<div>",{"class":"bg-nav"})),$(".nav-global-submenu").hide(),$(".nav-global-submenu-"+o).fadeIn("normal"),$(document).off("mouseenter.megaMenuClose"),void t.menuClose())})},menuClose:function(){var e=$(this.option);$(document).on("mouseenter.megaMenuClose","div",function(t){$(t.target).hasClass("header-main")||$(t.target).parents(".header-main")[0]||$(t.target).parents(".nav-global-submenu")[0]||$(t.target).hasClass("nav-global-submenu")||($(".nav-global-submenu").hide(),$(".bg-nav").remove(),e.removeClass("is-open"),$(document).off("mouseenter.megaMenuClose"))})},destroy:function(){$(document).off("mouseenter.megaMenuOpen")}}}(),spMenu=function(){return{option:{trigger:".js-spmenu",target:".nav-global-sp"},init:function(){var e=$(this.option.trigger),t=$(this.option.target);e.off("click"),e.on("click",function(n){n.preventDefault(),e.hasClass("is-open")?(t.fadeOut("normal"),$(this).removeClass("is-open")):(t.fadeIn("normal"),$(this).addClass("is-open"))}),$(".list-nav-global-sp h2").on("click",function(e){e.preventDefault(),$(this).next("div").slideToggle("normal"),$(this).toggleClass("is-open")})},destroy:function(){var e=$(this.option.trigger),t=$(this.option.target);t.css("display",""),e.next("ul").css("display",""),e.removeClass("is-open"),e.off(),$(".list-nav-global-sp h2").off()}}}();$(function(){var e=$("#pageTop");e.hide(),$(window).scroll(function(){$(this).scrollTop()>150?e.fadeIn():e.fadeOut()}),e.click(function(){return $("body,html").animate({scrollTop:0},500),!1})});var alignHeight=function(){return{option:{parent:"-align",children:"-item"},init:function(){var e=this.option,t=$("[class*="+e.parent+"]");t.length>0&&(alignHeight.changesize(e),$(window).on("resize.change",function(){$(window).trigger("changesize")}),$(window).on("changesize",function(){alignHeight.changesize()}))},reset:function(){var e=this.option,t=$("[class*="+e.parent+"]"),n="[class$="+e.children+"]";t.find(n).css("height","")},changesize:function(){var e=this.option,t=$("[class*="+e.parent+"]"),n="[class$="+e.children+"]";t.find(e.children).css("height",""),t.each(function(){var e=0;$(n,this).each(function(){$(this).outerHeight()>e&&(e=$(this).outerHeight())}),$(n,this).css("height",e)})},destroy:function(){$(window).off("resize.change changesize"),alignHeight.reset()}}}();$(function(){$(".tab").click(function(){$(".is-active").removeClass("is-active"),$(this).addClass("is-active"),$(".is-show").removeClass("is-show");const e=$(this).index();$(".tabCont").eq(e).addClass("is-show")})}),$(function(){$("a.btn--stop ,.reserveStop a").click(function(){return!1})}),function(e){e.fn.fixMe=function(){return this.each(function(){function o(){n=t.clone(),n.find("tbody").remove().end().addClass("fixed").insertBefore(t),i()}function i(){n.width(t.outerWidth()),n.find("th").each(function(n){e(this).css("width",t.find("th").eq(n).outerWidth()+"px")})}function s(){var o=e(this).scrollTop(),i=e(this).scrollLeft(),s=e(".header").height();tableOffsetTop=t.offset().top-s,tableOffsetBottom=tableOffsetTop+t.height()-t.find("thead").height(),tableOffsetLeft=t.offset().left,tableOffsetTop>o||o>tableOffsetBottom?n.hide():o>=tableOffsetTop&&tableOffsetBottom>=o&&n.is(":hidden")&&n.show(),n.css({left:tableOffsetLeft-i+"px",top:s})}var n,t=e(this);e(window).resize(i),e(window).scroll(s),o()})}}(jQuery),$(window).on("load",function(){screen.width>767&&$(".schedule-table").fixMe()});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment