12. Append to Body - Completely stuck!


Can someone please help me with this, completely stuck here!

here is my code:

$(document).ready(function() {
    $("#button").click(function() {
        var toAdd = $("input[name=checkListItem]").val();


Have a read, about the SYNTAX
of the jQuery Selector by attribute equals


This one really is a tricky one, but you'll need to target your .list item to function the variable you made earlyer.

to do so you'll have to type:

$('.list').append("<div class='item'>"+ toAdd + "</div>");

hopes this helps :slightly_smiling:


Please re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

or even better use
= http://discuss.codecademy.com/t/using-backticks-to-format-your-code/3697/2