Learn
Similar to .addClass()
, the jQuery .removeClass()
method can remove a class from selected elements.
Its syntax is similar to .addClass()
:
$('.example-class').removeClass('active');
In the example above:
.removeClass()
is called on.example-class
elements.- The method removes the
'active'
class from all.example-class
elements.
Instructions
1.
Currently, the navigation menu is assigned a class called hide
that sets its display to none
.
Use the .removeClass()
method to show the navigation menu when a user’s mouse enters the menu button’s area.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.