$('#message-append-'+$to).imagesLoaded( function() {
$('#message-append-'+$to).animate({ scrollTop: $('#message-append-'+$to)[0].scrollHeight+1000}, 1000);
});
I'm getting a script error bcause of undefined scrollHeight on every page which has NO message box ;)
From Michael Zülsdorff
Rafael, please add some length checking to
$('#message-append-'+$to).imagesLoaded( function() { $('#message-append-'+$to).animate({ scrollTop: $('#message-append-'+$to)[0].scrollHeight+1000}, 1000); }); I'm getting a script error bcause of undefined scrollHeight on every page which has NO message box ;)