In this lab, you'll be practicing using jQuery methods to manipulate HTML elements in the DOM.
You'll be coding your solution in js/methods.js
underneath the comments. You'll want to have index.html
open in the browser to test your work. After you make a change in js/methods.js
, save your changes and refresh the browser.
Your task is to select each button from the index.html
page that is labeled with an ID number for example #b1
and use the click event method to write the code necessary to trigger the paragraph (in index.html
) below the button to behave as the button is labeled for example #b1
should .hide()
paragraph 1 #p1
. The first example is filled in. Repeat this for all remaining buttons and targeted elements. As a reference you can see a live code example here.
View jQuery Methods on Learn.co and start learning to code for free.