I need to convert scrollTop in jQuery to JavaScript: This My Code:
const scrollToBottom = () => {
let locationPage = document.querySelector('.main__chat_window');
locationPage.scrollTop(locationPage.prop("scrollHeight"));
}
my problem in "(locationPage.prop("scrollHeight")" the height is updated in my project.
locationPage.scrollTop=locationPage.scrollHeight;