$(document).ready(function () {
$(function () {
var offset = $(".control.Home .rightCol").offset();
var topPadding = 15;
$(window).scroll(function () {
if ($(window).scrollTop() > offset.top) {
$(".control.Home .rightCol").stop().animate({
marginTop: $(window).scrollTop() - offset.top + topPadding
});
} else {
$(".control.Home .rightCol").stop().animate({
marginTop: 0
});
};
});
});
});
I am currently experiencing an issue where the right hand side div on my localhost website keeps scrolling down as I scroll through the page. How can I make the div stop at a certain point aligned with the left hand side div's position?
Website:
I have added a link to the website so you can see the div scrolling behavior. I need it to stop before reaching the footer area where the scrolling icons are located.