<script type="text/javascript">
$(document).ready(function () {
var top = $('#rt_outer').offset().top - parseFloat($('#rt_outer').css('marginTop').replace(/auto/, 0));
$(window).scroll(function (event) {
// what the y position of the scroll is
var y = $(this).scrollTop();
// whether that's below the form
if (y >= top) {
// if so, ad the fixed class
$('#rt_outer').addClass('fixed');
} else {
// otherwise remove it
$('#rt_outer').removeClass('fixed');
}
});
});
</script>
問題はかなり簡単です。ページ内の新しい場所へのヘッダー リダイレクトを使用する場合 (たとえば、途中で、header("somepage.php#halfway") を使用して php スクリプトを処理した後に #halfway にジャンプします) このスクリプトによって処理される div コンテナーが勝ちましたページがいずれかの方向にスクロールされるまで下にジャンプしないでください。
これには解決策があることは知っていますが、何がわからないだけです。