title: Appending bootstrap "list-group-item" to "list-group" with jquery
body: <p>I have  a bootstrap "form-group" that contains textarea  and button form controls, I want to append the text which written inside the textarea to a list-group  when button pressed</p>
  
  <p>This is my page  whith Jquery trial code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $('button:last').click(function() {
      comment = $('textarea').val();
      $('.list-group').append("&lt;li class='list-group-item'&gt;+comment+&lt;/li&gt;");
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous"&gt;
  &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;div class="container"&gt;
    &lt;ul class="list-group"&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="container" style="margin-top: 60px"&gt;
    &lt;form class="well col-xs-6 col-xs-offset-3"&gt;
      &lt;div class="form-group"&gt;
        &lt;label id="commentTitle" for="comment"&gt;Comment:&lt;/label&gt;
        &lt;textarea class="form-control" rows="5" id="comment"&gt;&lt;/textarea&gt;
      &lt;/div&gt;
      &lt;button class="btn btn-primary "&gt;submit&lt;/button&gt;
    &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>