jQuery CSS Manipulation
jQuery CSS manipulation provides different method that is very useful for manipulation the HTML element's class property value.These methods are addClass()
,removeClass()
and toggleClass()
.
Let us see the use of these methods.
addClass()
: It is useful for adding one or more classes to the selected HTML element without affecting the currently assigned classes to the HTML element.removeClass()
: It is used to remove the existing classes to the selected HTML element.toggleClass()
: It is used to add and removes the classes to the selected HTML element.