kswedberg / jquery-smooth-scroll

Automatically make same-page links scroll smoothly
MIT License
1.97k stars 427 forks source link

Should do nothing if no scrollable match is found #92

Closed aviemet closed 8 years ago

aviemet commented 8 years ago

If there is no match in DOM to scroll to, it scrolls to the top of the page. Should do nothing instead.

kswedberg commented 8 years ago

thanks for the report. I have a fix that I'll try to push tomorrow. I'm continuing on the assumption that if there is no match in the DOM, neither the beforeScroll nor the afterScroll callbacks should fire either. Sound right?