Add Class on ready, remove class on mouseenter
问题 I'm creating my portfolio website. I'm looking to add class on document ready, and remove/change that class to a different class on hover. I'm using lightgallery & CSS gram filters to my images on load and hover. Previously, I added a list. Unfortunately it did not work well for my needs. Previous code $("#gallery a").on({ mouseenter : function() { $(this).find(".nak-gallery-poster").removeClass("inkwell").addClass("mayfair"); }, mouseleave : function() { $(this).find(".nak-gallery-poster")