0
$("#content").scroll(function(e){
var distance_from_top = $("#content").scrollTop();
var theinverse = -1 * distance_from_top;
var theinverse2 = theinverse + "px";
$("#topheader").css("marginTop", theinverse2);
});
什麼是最有效的方法來做到這一點?基本上使#topheader上邊距等於從頂部滾動的負距離。什麼是最有效的方式來做到這一點(jQuery的片段)?