[jQuery Code] Use the jQuery library to check the position of the bottom of the page and adjust the page elements if necessary
$(document).ready(function() { checkFooterPosition(); }); $(window).scroll(function() { checkFooterPosition(); }); function checkFooterPosition() { var windowBottom = $(window).scrollTop() + $(window).height(); var footerTop = $('footer').offset().top; var A = $(document).width(); if (A > 1280) { if (windowBottom >= footerTop) { var distance = windowBottom - footerTop + 60; $('.freecatalog').css('bottom', distance); } else { $('.freecatalog').css('bottom', ''); } } }
-
Like( eleven ) -
Dislike( two )