Dom Index Page 1
How to Change a DOM element's class with JavaScript
If you want to change element class using javascript you can try: document.getElementById("ElementId").classList.add('NewClass') to add a new class. Alternative methods are remove and contains. Check here for more examples and alternatives using jQuery or coe for older browsers.
Dom Index Page 1
How to check if an element is hidden in jQuery?
To check if an element is hidden use: $(element).is(":visible");