Hey there. I am going through the Codecademy lessons trying to learn jQuery, and there is a lesson that I have come across where the correct answer includes + addTo +.. i understand the other components of the correct answer, but this piece of code is something that wasn't previously discussed in other lessons on Codecademy, and I am wondering what it means, and what the purpose of it is? Here is the complete code:
- $(document).ready(function () {
- $("#button").click(function () {
- var toAdd = $('input[name=checkListItem]').val();
- $('.list').append('<div class="item">' + toAdd + "</div>");
- });
- });
Any help would be greatly appreciated!
Thanks,
Joe