This commit is contained in:
İrem gecgecgec 2020-11-03 10:59:58 +03:00
commit d844e77940
833 changed files with 11089 additions and 0 deletions

View file

@ -0,0 +1,21 @@
var stickyPromoAnchor = $('.sticky-promo-anchor').offset();
$(window).scroll(function() {
xPos = $(this).scrollTop();
stickyPromo(xPos, stickyPromoAnchor.top);
});
function stickyPromo(xPos, anchorPos)
{
var offsetBy = 90;
var offsetPos = anchorPos - offsetBy;
if (xPos > offsetPos) {
$('.sticky-promo').css('position', 'fixed');
$('.sticky-promo').css('top', offsetBy);
} else {
$('.sticky-promo').css('position', 'relative');
$('.sticky-promo').css('top', 0);
}
}