thesmart/jquery-scrollspy — pull request #5 by Mithgol (2014-02-10 08:03:20+00:00)
Title: onScroll: throttled only once, always perform after the DOM is ready

The following changes are made:

* `onScroll` is throttled only once (otherwise two throttles happen independently of each other)

* not only one, but **every** `onScroll` is delayed until the DOM is ready (and throttled to ensure that `onScroll` is not called several times when the DOM becomes ready)

* each `$.scrollSpy(...)` call causes one `onScroll` call (throttled and DOM-delayed) regardless of the `isSpying` state (otherwise the second call and later `$.scrollSpy(...)` calls do not immediately trigger `scrollSpy:enter` on elements that are already “above the fold”)

The latter is actually a bugfix.