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.
我希望 div 在我向上滚动时显示,当我向下滚动到页面时它会出现。
请帮助我,我是 jquery 的新手
function MyUpDownFunction(){ var top-height= $('header-div-element').position().top + <any-other-custom-height>; if( $(window).scrollTop() > top-height ){ $('#your-div').slideDown(); }else{ $('#your-div').slideUp(); } }