/*--------------------------------------------------------------------------* * * (参考)http://www.webopixel.net/javascript/538.html * *--------------------------------------------------------------------------*/ //トップへ戻るボタン $(function() { var topBtn = $('#page-top'); topBtn.hide(); //スクロールが100に達したらボタン表示 $(window).scroll(function () { if ($(this).scrollTop() > 100) { topBtn.fadeIn(); } else { topBtn.fadeOut(); } }); //スクロールしてトップ topBtn.click(function () { $('body,html').animate({ scrollTop: 0 }, 500); return false; }); }); /*--------------------------------------------------------------------------* * * footerFixed.js * * MIT-style license. * * 2007 Kazuma Nishihata [to-R] * http://blog.webcreativepark.net * *--------------------------------------------------------------------------*/ new function(){ var footerId = "footer"; //メイン function footerFixed(){ //ドキュメントの高さ var dh = document.getElementsByTagName("body")[0].clientHeight; //フッターのtopからの位置 document.getElementById(footerId).style.top = "0px"; var ft = document.getElementById(footerId).offsetTop; //フッターの高さ var fh = document.getElementById(footerId).offsetHeight; //ウィンドウの高さ if (window.innerHeight){ var wh = window.innerHeight; }else if(document.documentElement && document.documentElement.clientHeight != 0){ var wh = document.documentElement.clientHeight; } if(ft+fh