title: Can method used in the .append() in JQuery?
body: <p>I am new to JQuery. I want to use JQuery to realize a function that can take the content of the input and put the content into a list. Now I got a problem:
  this is part of the HTML code.</p>
  
  <pre><code>    &lt;body&gt;
          &lt;form name="checkListForm"&gt;
              &lt;input type="text" name="checkListItem"/&gt;
          &lt;/form&gt;
          &lt;div id="button"&gt;Add!&lt;/div&gt;
          &lt;br/&gt;
          &lt;div class="list"&gt;&lt;/div&gt;
      &lt;/body&gt;
  </code></pre>
  
  <p>This is the JQuery Code:</p>
  
  <pre><code>$(document).ready(function(){
      $('#button').click(function(){
          var toAdd = $('input[name=checkListItem]').val();
          $('.list').append('.div'.addClass('item').html(toAdd));
      });  
  });
  </code></pre>
  
  <p>I am trying to realize this: When I input something and click the button, the content will be stored in the <code>toAdd</code>, and a new div with <code>class="item"</code> and <code>toAdd</code> content will be appended in the list. I know there is another correct method to realize this:</p>
  
  <pre><code> $('.list').append('&lt;div class="item"&gt;' + toAdd + '&lt;/div&gt;');
  </code></pre>
  
  <p>So I just wonder why my code does not work here? </p>