Spoiler Alert !
a jQuery plugin that allows you to animate CSS properties based on distance to an object by Scott Robbin Download Approach Now jQuery Approach works in a very similar manner to jQuery animate, however it animates over distance instead of time. The closer you get to the object, the more the style will be applied. For example, you could use approach on an element's opacity, increasing the opacity as you get closer. Approach: allows you to animate CSS properties based on distance to an object