> $('#divname').scrollTop( $('#divname')[0].scrollHeight );

I think you meant:

$('#divname')[0].scrollTop( $('#divname')[0].scrollHeight );

Here's another way that avoids redundant selector expressions:

$('#divname').each(function(){this.scrollTop = this.scrollHeight});

Reply via email to