matthieua/jackInTheBox — pull request #13 by attilaolah (2014-01-30 12:36:40+00:00)
Title: Faster scroll callback

To sum up the changes:

* Remove unused private methods and variables. Especially the method, since it is inaccessible from the outside, but cannot be optimised away like the variable.
* Use `$(window).on "scroll", …` instead of `$window.scroll =`.
* Use a very light scroll callback and an interval that runs every 50 milliseconds to fire the actual callback. You should return from the scroll callback as soon as possible. The interval can be customised using the `interval` option.
* Use `$(…).map(…)` instead of `$(…).each(…)` to filter out boxes that have already been processed. This way we don't need to loop through them again. This saves many `$(…)` calls, especially on pages where you animate lots of elements.