Toggle class using jQuery

Sometimes we faced the problem of toggling the class in html because of only by changing the classes can do a different action in html.
Toggle class means exchange the class names. We can toggle class using jQuery as follows:

OR toggle class using jQuery may be achieved through writing like that also

You Might Interested In