Hi All ,
I have the following code which centers the popup when we scroll , it quickly re-positions itselef to center. How to get the smoothing effect as if it is dropping very smooth.
$(window).scroll(function () {
var top = ($(window).height() - $('.myPopUp').height()) / 2 + $(window).scrollTop();
$('.myPopUp').animate({ top: top }, 10);
});
I tried to play around with speed , but its pretty fast.