sakabako/scrollMonitor — pull request #11 by hswolff (2013-02-14 00:55:04+00:00)
Title: Make scrollMonitor instance based and allow for multiple containers

Opening this PR per discussion from issue #10.

This PR contains two changes:

**Make scrollMonitor instance based**
I've revised the internal architecture of scrollMonitor to be instance based. This was necessary for the second part of this PR.

**Allow for multiple containers**
With this PR you can now create additional scrollMonitor instances on different DOM elements. This is useful when you have a

with overflow: scroll set on it and you want to use scrollMonitor.

I've extended the current API to allow for this additional functionality. I've added an additional argument to scrollMonitor.create/update/recalculateLocations. They now accept a jQuery object in which a new scrollMonitor instance is attached.

I realized I didn't update the docs for scrollMonitor to reflect these changes. I'm going to add a commit which does so, and hopefully that will better explain the changes I did.