how would I use .removeClass to remove all matching classes instead of calling out each element individually?
So instead of this:
$("input").removeClass("CO_form_alert");
$("select").removeClass("CO_form_alert");
$("input, select").removeClass("CO_form_alert");
or even
$(".CO_form_alert").removeClass("CO_form_alert");
Hint: jQuery always works on all selected elements.
$(".CO_form_alert").removeClass("CO_form_alert");
why couldn't you just use the following to do as you asked remove the class from all elements (versus a single defined element)
$(".CO_form_alert").removeClass("CO_form_alert");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With