The DOM spec defines the classList interface, allowing for adding/removing/toggling classes or checking if an element contains a specified class using built-in methods as opposed to manually parsing ...
Just include the script and jQuery in your website tag and call it on the elements you want to check. $('.dummy').viewportChecker({ classToAdd: 'visible', // Class to add to the elements when they are ...