javascript - Remain in bottom while animating footer -


i have footer#footer contains company location. when load contact page hash #locationjavascript scrolls bottom of page, , makes callback enlarge footer, important element. how increase size of footer while page remains @ bottom (so seems footer pushing content).

var hash = window.location.hash; if (hash=="#location") {     var scrollpos = $(document).height()-$(window).height()+"px"     $("body,html").delay(200).animate({         scrolltop: scrollpos     }, "slow", function() { exfoot() }); } function exfoot(){     var $f = $("footer#footer");     $f.animate({         height: $f.height()*2     }, "slow"); } 

i added function

$("html, body").animate({ scrolltop: $(document).height() }, "slow"); 

so looks

function exfoot(){     var $f = $("footer#footer");     $f.animate({         height: $f.height()*2     }, "slow");     $("html, body").animate({ scrolltop: $(document).height() }, "slow"); } 

both speed of $f.animate , body,html.animate have same, act simultaneously.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -