freeCodeCamp Challenge Guide: Remove Classes from an element with jQuery

freeCodeCamp Challenge Guide: Remove Classes from an element with jQuery
0.0 0

#1

The same way we can add classes using jQuery, we an also remove them with removeClass().

$("button").removeClass("btn-default");

#2

Hello @camperbot , do you fix this problem I have same problem in this challenge


#3

$(“button”).removeClass(“animated bounce”);
$(".well").removeClass(“animated shake”);
$("#target3").removeClass(“animated fadeOut”);

$("button").removeClass("btn-default");

I already fix with this solution my friends…


#4

What is a bit confusing is the fact that says “all button”, soo… I’m perplexed, don’t know what I’m looking for… smh…


#5

Please help me, I have the following situation,but its not accepting it says (Only use jQuery to remove this class from the element.)

jQuery Playground

#left-well

#target1 #target2 #target3

#right-well

#target4 #target5 #target6

–>


#7

Yes, its working, but its the same as you do math like this: 2+2+2+2+2+2 = 12 when you can do like this: 2*6=12
E.g
$(“button”).addClass(“animated bounce”);
$(".well").addClass(“animated shake”);
$("#target3").addClass(“animated fadeOut”);
$(“button”).removeClass(“btn-default”);


#8