title: get value from textarea and create a new textarea with the text
body: <p>Now i have a problem with the get value ~ I was doing a function which is when i click a button it will show up a modal and inside it have a textarea. once you write all the content inside, click ok button it will create a new textarea with the text you wrote. You can do it multiple time.i only know how to add a new textarea but i have no idea how to get the value.i have a hard time with this function~ hope anyone can help me. i am a newbie in this area. Sorry about my bad grammar.</p>
  
  <p>**Html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
   
  var counter=1;
  
  $('.add').click(function() {
   
   
  $('.block:last').before('&lt;div class="block"&gt;'+
  '&lt;textarea&gt;&lt;/textarea&gt;'+
  '&lt;/div&gt;');
   
  counter++;
  });
  
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;div class="block"&gt;
  &lt;button type="button" class="btn btn-default btn-lg start-new-post-button-setting" data-toggle="modal" data-target="#codetextarea"&gt;Add code textarea&lt;/button&gt;
  &lt;div class="modal fade" id="codetextarea" role="dialog"&gt;
  &lt;div class="modal-dialog"&gt;
  &lt;div class="modal-content"&gt;
  &lt;div class="modal-body"&gt;
  &lt;textarea class=" textarea-setting" name="message" id="area"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
  &lt;span class="add"&gt;&lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;OK&lt;/button&gt;&lt;/span&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>** </p>