I have a div:
<div id="foo">
</div>
And I load data into it with ajax, however using this technique .scrollTop doesnt seem to work. Perhaps the program thinks there isnt anyhting “physical” in it if you understand what im trying to say, just something JavaScript has put in. How can I make it work?
Code:
<div id="conversation" name="conversation" style="height:400px;overflow:scroll;margin-top: 25px;"></div>
….
function loadConversation(){
$("#conversation").load("../includes/ajax/getConversation.php?offset=0&memberid=1911&maxoffset=20");
$('#conversation').scrollTop = 9999;
}
loadConversation();
setInterval (loadConversation, 2500);
I always believe scrollTop was a function not a property. Why don’t you try like this.