Why I don't see my text?



Hello, the exercise is correct, but I don't understand why, if I write something in the form field and then I click Add, it says undefined otherwise the input I wrote.

$(document).ready(function() {
    $("#button").click(function() {
        var toAdd = $("input[checkListItem]").val();
        $(".list").append("<div class='item'>" + toAdd + "<div>"         );




var toAdd = $("input[checkListItem]").val();

you need to specify which input field you want the value, in this case input with name checkListItem


Thank you very much!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.