//画面サイズごとに各パートのサイズを調整 $(window).on('load scroll resize', function() { //トップへ戻るボタンを隠しておく var topBtn = $('.pageup,.popup'); var w = $(window).width(); var h = $(window).height(); var m1 = 640; var m2 = 768; var m3 = 1000; if ($(this).scrollTop() < 300) { topBtn.hide(); if (h <= m1 || w <= m1) { $('body').css('font-size', '14px'); $('.menu ul li').css('width', '175px'); $('.menu ul li.long').css('width', '350px'); $('.title img').css('height', '380px'); $('.menu').css('width', '90px'); $('.menu').css('height', '90px'); $('#toggle img').css('width', '75px'); $('#toggle img').css('margin-top', '10px'); } else if (h <= m2 || w <= m2){ $('body').css('font-size', '16px'); $('.menu ul li').css('width', '200px'); $('.menu ul li.long').css('width', '400px'); $('.title img').css('height', '500px'); $('.menu').css('width', '110px'); $('.menu').css('height', '110px'); $('#toggle img').css('width', '85px'); $('#toggle img').css('margin-top', '17px'); } else { $('body').css('font-size', '18px'); $('.menu ul li').css('width', '250px'); $('.menu ul li.long').css('width', '500px'); $('.title img').css('height', '700px'); $('.menu').css('width', '150px'); $('.menu').css('height', '150px'); $('#toggle img').css('width', '125px'); $('#toggle img').css('margin-top', '20px'); } } else { topBtn.fadeIn(); if (h <= m1 || w <= m1) { $('body').css('font-size', '14px'); $('.menu ul li').css('width', '175px'); $('.menu ul li.long').css('width', '350px'); $('.title img').css('height', '250px'); $('.menu').css('width', '55px'); $('.menu').css('height', '55px'); $('#toggle img').css('width', '45px'); $('#toggle img').css('margin-top', '8px'); } else if (h <= m2 || w <= m2){ $('body').css('font-size', '16px'); $('.menu ul li').css('width', '200px'); $('.menu ul li.long').css('width', '400px'); $('.title img').css('height', '350px'); $('.menu').css('width', '80px'); $('.menu').css('height', '80px'); $('#toggle img').css('width', '65px'); $('#toggle img').css('margin-top', '10px'); } else { $('body').css('font-size', '18px'); $('.menu ul li').css('width', '225px'); $('.menu ul li.long').css('width', '450px'); $('.title img').css('height', '600px'); $('.menu').css('width', '120px'); $('.menu').css('height', '120px'); $('#toggle img').css('width', '95px'); $('#toggle img').css('margin-top', '17px'); } } }); //由緒のアニメーション関係 $(function(){ $('#fadein_area ul li').hide(); // 繰り返し処理 $('#fadein_area ul li').each(function(i) { // 遅延させてフェードイン $(this).delay(1500 * i).fadeIn(5000); }); }); $(function() { $('.next, .yuisho-top-skip').click(function(){ $('.yuisho-top-bg,.yuisho-top-text,.yuisho-top-skip').fadeOut(); $("html,body").animate({scrollTop:0},"300"); }); }); //由緒のスキップをフェードアウト setTimeout(function() { $('.yuisho-top-skip').fadeOut(); }, 15500); //メニューボタンのアニメーション $(function(){ $('#Panel1').prop("checked",false); $(window).scrollTop(); $(document).scrollTop(); }); $(document).ready(function(){ $("label").click(function(){ $("p#toggle").toggle(); }); $('.menu ul').click(function(){ $('#Panel1').prop("checked",false); $("p#toggle").toggle(); }); }); //ページ内リンクのアニメーション $(function(){ $('a[href^=#]').click(function() { var speed = 500; var href= $(this).attr("href"); var target = $(href == "#" || href == "" ? 'html' : href); var position = target.offset().top; $('body,html').animate({scrollTop:position}, speed, 'swing'); return false; }); }); $(function(){ $('.scroll_area').jScrollPane(); });