I am using the theme HTML, demo 5, Metronic 7.2.9 and implementing chat functionality.
Due to a lot of messages, when the page is loaded, I need to scroll automatically to be positioned in the bottom - showing the last message. How can I get it?
Thanks
Hi,
You just need to calculate the height of the scrollable messages container and use javascript:
const el = document.querySelector("#kt_messages_container");
el.scrollTop = el.scrollHeight;
<div class="scroll scroll-pull" >
...
</div>