The slideDown applied to a div does the slideDown but doesn't scroll the page down and the div slided down div remains hidden from view. Is there a way to scroll the page down synchronously with slideDown so this div will be visible entirely?
$('#log').append('<div id="in_log">...</div>'); $('#in_log').slideDown('fast');
preguntado el 08 de noviembre de 11 a las 12:11
slideDown does not scroll the page automatically down. Also, you cannot scroll the page synchronously with the slideDown as you cannot determine the final height of the division. What you can do is to scroll the page using .animate() after the slideDown animation is completed
you could scroll to the top of the div by doing:
var top = $('#in_log').offset().top $(window).scrollTop(top);