balupton/jquery-scrollto — pull request #3 by meenie (2012-03-14 05:18:15+00:00)
Title: Adding Offset Parameter

I've added in an offset parameter so you can specify how far the specified element should be from the top of the page. I needed this in my latest project where the top menu was fixed and 60px tall. When I scrolled down to a specific element, ScrollTo would stop when the element was underneath the top menu. The offset makes it so ScrollTo will stop an offset amount of pixels before the element. It also accepts a string like '60px' so no worries about the format of how it's passed in. As long as the number is first.