The function: I want to change the class of a certain item when a user see a certain div (scrolls down to it).
How I do it now: I\'
I use a similar plugin but this uses the bind method and uses an event -> http://remysharp.com/2009/01/26/element-in-view-event-plugin/
Sample usage :
$('div').bind('inview', function (event, visible) {
if (visible == true) {
// element is now visible in the viewport
} else {
// element has gone out of viewport
}
});