While classes allow us to target multiple elements at once, we can also target single elements by id.

To select by id, we prepend the element’s id name with the # symbol.


In the example above, we target the #someId element and call the .hide() method on it. The .hide() method hides the someId element when the web page renders to a client’s browser.

Let’s target by id to hide the navigation menu in our MOVE Gear site.



Inside our ready callback function in the main.js file, use jQuery to select the #nav-dropdown element.


Call the .hide() method on the '#nav-dropdown' element.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?