To create an event listener that will print out the text content of a button when clicked. You must use this
to accomplish...this.
- Clone this repo.
- Write code in the starter
script.js
file. You do not need to modifyindex.html
.
When you're done, it should display this functionality.
Click here if you want a hint...
You may need to look up a few helpful methods to use along with $(this)
in the jQuery docs. Some methods to keep an eye out for are listed below, but bear in mind that one might be best suited for the exercise.
.html()
.text()
.contents()