¿Cómo puedo determinar scrollHeight de una división uso css overflow:auto?
He intentado
$('test').scrollHeight();
$('test').height(); but that just returns the size of the div not all the content
En última instancia, I'm tratando de crear un chat y siempre tienen la barra de desplazamiento al mensaje actual en la pantalla.
Así que estaba pensando en algo como lo siguiente:
var test = $('test').height();
$('test').scrollTop(test);
Gracias,
Brian
scrollHeight
es una propiedad javascript normal por lo que no necesitas jQuery.
var test = document.getElementById("foo").scrollHeight;