1.

How to add or remove classes to an element in jQuery?

Answer»

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’);


Discussion

No Comment Found