cssのoverflow:autoを使って、divisionのscrollHeightを決定するには?
を試してみました。
$('test').scrollHeight();
$('test').height(); but that just returns the size of the div not all the content
最終的には、チャットを作成して、常に画面上の現在のメッセージへのスクロールバーを表示させようとしています。
そこで、以下のようなことを考えていました。
var test = $('test').height();
$('test').scrollTop(test);
ありがとうございました。
Brian
scrollHeight
は、通常のjavascriptのプロパティなので、jQueryは必要ありません。
var test = document.getElementById("foo").scrollHeight;