Created
March 22, 2016 20:18
-
-
Save Shaz3e/20c1a5ceb0f5e2843d18 to your computer and use it in GitHub Desktop.
Detect Bottom on Scroll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
$(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