var smoothScroll = new scrollToSmooth('a', { targetAttribute: 'href', duration: 800, easing: 'easeOutCubic', callback: function () { console.log('we reached it!'); }, fixedHeader: null }) smoothScroll.init();
Number
400
Scroll time in milliseconds
string
linear
Easing function used for scrolling. Available Easings:
function
null
Callback to be executed when scrolling is finished
The header element Example: '#fixed-header'