I have the following code and I've been trying to convert it in vanilla javascript. Any pointers please ?
$(".className").click(() => {
$(".modal").animate({ scrollTop: 0 }, "normal");
return false;
});
This is where I've gotten so far by the click. I think it's working fine but the animate is still in jquery
document.getElementById("topBtn").onclick = () => {
$(".modal").animate({ scrollTop: 0 }, "normal");
return false;
};