Set your footer sticky at the bottom of the page

It time to show your footer bar sticky at the bottom of the page, just go though the script
[code lang="js"]
$(window).bind("load", function() {

var footerHeight = 0,
footerTop = 0,
$footer = $("footer");//Added your footer id over here

positionFooter();

function positionFooter() {

footerHeight = $footer.height();
footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";

if ( ($(document.body).height()+footerHeight) < $(window).height()) {
$footer.css({
position: "absolute"
}).animate({
top: footerTop
})
} else {
$footer.css({
position: "static"
})
}

}

$(window)
.scroll(positionFooter)
.resize(positionFooter)

});
[/code]

Comments

Popular posts from this blog

Send email from xampp localhost

Modify item price in cart after placing order using sales_quote_add_item

Convert long url to short url using tinyurl api