'how can I make this "scroll on load" script smoother & slower?

I found & used this Javascript code to make my site scroll to a specific position once the page loads. My only issue is that this scroll action is instantaneous/ abrupt.

Does anybody know how to edit the below Javascript code so that the scroll animation is slower & smoother? I literally found this code & don't know how Javascript works.

<script type="text/javascript">
   $(document).ready(function(){
     var divLoc = $('#123').offset();
     $('html, body').animate({scrollTop: divLoc.top}, "slow");
 });
 </script>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source