Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //sticky footer 1
- $(document).ready(function(){
- $(window).resize(function(){
- var footerHeight = $('.footer').outerHeight();
- var stickFooterPush = $('.push').height(footerHeight);
- $('.wrapper').css({'marginBottom':'-' + footerHeight + 'px'});
- });
- $(window).resize();
- });
- //sticky footer 2
- jQuery(function($) {
- $(window).load(function() {
- stickyFooter();
- function stickyFooter(){
- var bodyHeight = $("body").height() + $("#colophon").height();
- var vwptHeight = $(window).height();
- if (vwptHeight > bodyHeight) {
- $("footer#colophon").css("position","absolute").css("bottom",0).css("left",0).css("right",0);
- }else {
- $("footer#colophon").css("position","relative");
- }
- }
- $(window).resize(stickyFooter);
- $(window).scroll(stickyFooter)
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment