How to add remove and change css class using JQueryIn this article I will show you how you can add css class to the control using JQuery at dynamically.
To add css class to a control
$('myDiv').addClass('yourClass');
Here in the code above I am finding myDiv from the page and then calling addClass() method to add css class to the div.
To remove css class from a control
$('myDiv').removeClass('yourClass').
To remove css class from the div use removeClass().
To change css class of a control
$('myDiv').removeClass('yourClass').addClass('myClass');
To change a css class from the control we need to remove the existing class from the control and then add a new class name otherwise new class will be added to control along with existing class.
Enjoy Coding....................