Remove class using jQuery

Yip:

$(this).removeClass('er-green');
$(this).addClass('er-red');

Or remove them all first:

If a class name is included as a parameter, then only that class will be removed from the set of matched elements. If no class names are specified in the parameter, all classes will be removed.

$(this).removeClass();
$(this).addClass('er-red');

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)