With jQuery, it is easy to manipulate the style of elements.
jQuery Manipulating CSS
jQuery has several methods for CSS manipulation. We will look at the following methods:
addClass()
– Adds one or more classes to the selected elementsremoveClass()
– Removes one or more classes from the selected elementstoggleClass()
– Toggles between adding/removing classes from the selected elementscss()
– Sets or returns the style attribute