This code snippet will reset the element’s scrollbar position to default. This will apply to any elements with overflow auto or visible.

<script>
    var elem = document.querySelectorAll("selector");
    elem.scrollTop = 0;
 
    //or with jQuery
 
    var elem = jQuery('selector')[0];
    elem.scrollTop = 0;
</script>