Skip to content

Instantly share code, notes, and snippets.

@Shaz3e
Created March 22, 2016 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shaz3e/20c1a5ceb0f5e2843d18 to your computer and use it in GitHub Desktop.
Save Shaz3e/20c1a5ceb0f5e2843d18 to your computer and use it in GitHub Desktop.
Detect Bottom on Scroll
```
$(window).scroll(function(){
if($(window).scrollTop() + $(window).height() > $(document).height() - <?php echo( s3_option('s3cc_fixed_trigger') == '' ? 100 : s3_option('s3cc_fixed_trigger') );?>) {
$('.s3cc-fixed').css('position','static');
}else{
$('.s3cc-fixed').css('position','fixed');
}
});
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment