I’m trying to remove the btn class for items that only contain an extra argument in the class name like so:
<input type="button" class="btn btn-mini btn-success email-user" id="emailid5" value="Email Tester">
I only want to remove the .btn class for any class name that also contains email-user.
My current attempt is failing:
$('.btn email-user').remove();
Any idea what I’m missing?
$.fn.removeClass should do the trick. You first select the element, then remove the css class using
removeClassmethod.