I needed a way to on clicking of an A tag scroll to top of a list that was getting updated. So here is the code that I came across.
<script> jQuery(document).ready(function() { jQuery('a.link-designation').on("click", function () { jQuery('html, body').animate({ scrollTop: (jQuery('#top-of-list').offset().top) },500); }); }); </script>