Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ビューポートとスクロールに基づいて要素を切り替えようとしています。
を使用する$(window).scroll(function()..と、ユーザーがスクロールしたときにイベントを発生させることができますが、要素を非表示にするために上にスクロールしたかどうかを確認するにはどうすればよいですか?
$(window).scroll(function()..
IEでは、プロパティは
document.body.scrollTop
標準ベースのブラウザでは、プロパティは
window.pageYOffset
要素を非表示にするには、値0をテストします。