jQuery comes with two syntaxes, addClass()and,removeClass() to respectively add or remove CSS classes dynamically.

 

These can be used with the following syntax forms:

  • $(‘#para1’).addClass(‘highlight’);
  • $(‘#para1’).removeClass(‘highlight’);

Suggest An Answer

No suggestions Available!