Smooth Scrolling Usage smoothScrollToPx(target, callback, duration); <script src="smooth-scrolling.js"></script> <script> smoothScrollToPx(1000, function() {console.log('done')}, 1000); </script>