briangonzalez/jquery.pep.js — pull request #61 by jameslai (2013-07-18 22:18:45+00:00)
Title: Adding support for arbitrary constraints

Pep had the ability to constrain to a parent or the document which worked beautifully - they are well integrated into the easing and work as expected.

However, in the example located http://codepen.io/anon/pen/mHpnj, the sliding containment was being handled within the rest event, which meant the item being moved could temporarily move outside of its container. It was up to the rest event to finally put the slider back in place, rather than ensure it's limit as constrainTo was already doing.

This commit adds support for stating an arbitrary container, and can be seen in action here:

http://codepen.io/jameslai/pen/IEGJr