0

I Have edited Sticky Footer script in this way:

<script type="text/javascript">
    function stickyFooter(){
            jQuery("#stickyFooter").css({position: "absolute",top:($(window).scrollTop()+$(window).height()-$("#stickyFooter").height())+"px"});
    }

    function myStickyFooter(){
            jQuery("#stickyFooter").css({position: "absolute"});
            jQuery("#stickyFooter").animate({
            top:($(window).scrollTop()+$(window).height()-$("#stickyFooter").height())+"px"
          }, 2000, function() {
          });
    }

    jQuery(function(){

        myStickyFooter();
        jQuery(window)
            .scroll(stickyFooter)
            .resize(stickyFooter);
    });
</script>

So, on firefox it works fine; on Chrome or Ie, it works .. conversely: stickyFooter appears from top to bottom page. Why? Thanks a lot!

Infocurci
  • 63
  • 8

1 Answers1

2

This works with all browsers.

SOLUTION:

You need to put up extra work to set initial position of sticky footer to window.height() and then animate it up to window.height()-($('#footer').height())

Spectre87
  • 2,374
  • 1
  • 24
  • 37