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'm using this fine script (http://code.google.com/p/jquery-appear/) wich works really fine to just fire an jquery event when a div gets visible to the user. However it only fires once. So if you scroll down the page the jquery gets executed fine. But if I scroll up and then down again it doesent fire. This is my jquery:
$('#myDiv').appear(function() {
$("#aDiv").addClass("active");
});
What I want to do: Make the script execute everytime "myDiv" appear and not only the first.
Does anyone have an idea on how I could do this?