Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/04/2009, 09:50
Aper
 
Fecha de Ingreso: marzo-2007
Mensajes: 103
Antigüedad: 18 años
Puntos: 0
Respuesta: Mantener scroll en div siempre abajo

claro pero serian un contador de id.. osea id1, id2, id3... Se que hay una forma mas facil..

Yo encontre algo asi.. pero nose donde estaria el error

Código:
function scrolldown() {
var target = document.getElementById('divchat');

var isScrolledToBottom = target.scrollTop + target.offsetHeight >= target.scrollHeight;

if (isScrolledToBottom) {
target.scrollTop = target.scrollHeight - target.offsetHeight;
}
}

nose como implementarlo

Última edición por Aper; 01/04/2009 a las 10:17