Skip to content

Instantly share code, notes, and snippets.

@ksloan
Created March 14, 2014 19:33
Show Gist options
  • Save ksloan/9555060 to your computer and use it in GitHub Desktop.
Save ksloan/9555060 to your computer and use it in GitHub Desktop.
fixed position scrolling after certain point
$(window).scroll(function(){
$("#theFixed").css("top",Math.max(0,250-$(this).scrollTop()));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment