How to scroll to a div at its bottom using javascript or jQuery

I am building a chat module. I want to auto scroll the chat box to bottom, the latest message in chat box. 

Asked 06 Dec, 15 at 09:18 AM

Arjun Singh
Html Javascript


Try This:

var Objelement = Document.getElementById("smsmsgbox");
objelement.scrollTop = Objelement.scrollHeight;