12/14 - Append to Body not working


I don't see what I'm doing wrong here. The code looks correct to me. Keeps giving an error saying I'm not appending a DIV tag to the list.

        var toAdd = $('input[name=checkListItem]').val();
    $('.list').append('<div class="item">' + toAdd + '</div>')


Hi try to put It inside the click event


Ah yes that worked. Thanks.


Thank you! That worked for me too :slightly_smiling:


A post was split to a new topic: 12/14 - Append to Body