Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var height = $(document).height()-$(window).height();
- var scrolldepth = 0;
- var toTop = 0;
- $(window).scroll(function(event) {
- toTop = $(window).scrollTop();
- scrolldepth = Math.round((toTop/height)*100);
- if(scrolldepth >= scrolldepth_value && opened==0) {
- // Do something
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement