URL: https://www.progressiverobot.com/jquery-addclass/

Easily inject new classes using jQuery:

				
					
$( ".myEl" ).addClass( "boo ya" );

				
			

removeClass

addclass illustration for: removeClass

You can also use removeClass() to remove classes. This makes it easy to toggle between two states:

				
					
$( ".myEl" ).removeClass("boo").addClass( "ya" );