2011.04.06更新
この度、ホームページをリニューアル致しました。
また、今後ブログを使い色々な情報を発信していきますので宜しくお願い致します。
投稿者: 国島歯科
/* =====================================
footer
===================================== */
$(function () {
$(".fixed_box").css("bottom", -0 + "px");
var defPos = 0;
$(window).scroll(function () {
var currentPos = $(this).scrollTop();
if (currentPos > defPos) {
if ($(window).scrollTop() >= 300) {
$(".fixed_box").css("bottom", 0 + "px");
}
} else {
$(".fixed_box").css("bottom", -0 + "px");
}
defPos = currentPos;
});
});
$(function () {
$(window).on('scroll', function () {
var doch = $(document).innerHeight(); //ページ全体の高さ
var winh = $(window).innerHeight(); //ウィンドウの高さ
var bottom = doch - winh; //ページ全体の高さ - ウィンドウの高さ = ページの最下部位置
if (bottom * 0.8 <= $(window).scrollTop()) {
//一番下までスクロールした時に実行
$(".fixed_box").css("bottom", 0 + "px");
}
});
});