as stated in the title, i need to add/remove a class from a div when and only when it is visible in browser viewport. what i want to do is trigger an animation removing a class and using css transitions.. i know how to do that, but i need the code snippet to remove the class when a certain div is visible to the user.
can anyone help?
i checked the onScreen plugin in another post but im a bit of a noob with js/jquery and i had some problems with that.
thanks so much