Need help! Append to Body


#1

Hey hey! I'm little bit confused with the code. It seems to be write correctly, but in the preview of full screen I can not press or add text from the "input". What's wrong with my code?

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

#2

On both your functions you're missing a (
so it would be function()


#3

Thanks for the respond! Here is my code, that still doesn't work :

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

#4

You changed your original code, in first post you have this bit correct: $("button")

button is an id so it needs a # before it


#5

Thanks! I shouldn't study coding for 8 hours straight...


#6