Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 483 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 483 Bytes

jquery.smoothScrollTo

Usage example.

HTML:

<a href="#foobar" class="anchor">Lorem ipsum</a>
<!-- ... -->
<div id="foobar">target div</div>

JS:

$('a.anchor').smoothScrollTo();

Demo: http://najki.github.io/jquery.smoothScrollTo/demo.html

Options:

  • scrollTime - animation time in miliseconds
  • onBefore - called before animation starts (only if target is found)
  • onAfter - called after animation ends (only if target is found)