- Creat an
<input>
tag and give it a class on Line 26 - Create a click handler for
button
in JavaScript - select the
<input>
's class in the click handler, and then get the value using.val()
- store the value in a variable so that you can use it later
- ex:
var input = $(".class").val()
- You can also use
console.log
to double check that everything is working properly!console.log(input)
-
display your input to the screen using .append()
-
add style to the comment by adding a new
<div>
for each new comment
BONUS:
Empty the <input>
value so that the text is no longer there after you click on the button.
ex: $("input").val("")