How To Add CSS Class Using jQuery

How To Add CSS Class Using jQuery
Rating: 5 - 2 Votes

How To Add CSS Class Using jQuery

jqueryTo add CSS class using jQuery, you only need to use addClass method.  In the sample code given below, we are adding CSS class myStyle to a DIV element using function divClass().