Skip to content

Instantly share code, notes, and snippets.

@johnlouie04
Created February 1, 2013 02:43
Show Gist options
  • Save johnlouie04/4688773 to your computer and use it in GitHub Desktop.
Save johnlouie04/4688773 to your computer and use it in GitHub Desktop.
Simple Scrolling Up and Down
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();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment