We are creating a chat using ajax requests in rails and I'm trying to get a div to scroll to the bottom without much luck. We are wrapping everything in this div:
Is there a way to keep it scrolled to the bottom by default using JS ? Is there a way to keep it scrolled to the bottom after an ajax request ?
This is much easier if you're using jQuery:
using jQuery animate:
Works from jQuery 1.6
Newer method :