Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +------------------+
- | |
- | Div |
- +------------------+
- | | |
- | section | section|
- +---------|--------+
- function onScroll(e){
- if(scollMarginToTop > marginTop_of_box1){
- e.preventDefault();
- if(marginTop_of_box1 < height_of_box1)
- marginTop_of_box1 - scrolledPixels (only if scrolled down otherwise + scrolledPixels)
- else
- start scrolling of box 2
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement