Div that moves as you scroll
Div that moves as you scroll
Out of context: Reply #2
- Started
- Last post
- 6 Responses
- acescence0
the jquery that does it on the page you linked is at the bottom if you view source..
$(document).ready(function() {
cartYLoc = parseInt($(cartID).css("top").su...
$(window).scroll(function() {
var offset = cartYLoc;
if(cartYLoc - $(document).scrollTop() < 0) {
offset = $(document).scrollTop();
}
if (offset != 500) offset = offset - bottom_offset;
$(cartID).animate({top:offset...});
});