jsでposition:fixedっぽいやつ

スクロール終わった時にふわっとブラウザ下部にリンクを表示させたいときの方法。便利。

var scrollCount = 0;
$(window).scroll(function(){
burner.attr("style", "display:none;");
scrollCount++;
setTimeout(function(){
    scrollCount--;
    if (scrollCount == 0) {
        var scroll = document.body.scrollTop + window.innerHeight;
        burner.attr("style", "position:absolute;left:50%;top:" + scroll + "px;margin-top:-50px;margin-left:-160px;z-index:50;display:none;");
        burner.animate({height: "toggle", opacity: "toggle"}, "slow");
    }
}, 1000);
});
http://blog.ville.jp/2011/10/15/845


実はiOS5以降/Android2.2以降でそれぞれposition:fixedに対応してる。
…んだけど、色々バグっぽいのがあって使うにはやや難があるのが現状だったりする。