title: jquery remove textarea duplicate line
body: <p>i has a problem with textarea find duplicate.</p>
  
  <pre><code>&lt;textarea name="listnumber" &gt;
  12345678
  12345674
  12345678
  12345672
  12345678
  &lt;/textarea&gt;
  </code></pre>
  
  <p>and i auto remove duplicate when change using jquery.
  result will be like this</p>
  
  <pre><code>&lt;textarea name="listnumber" &gt;
  12345678
  12345674
  12345672
  &lt;/textarea&gt;
  </code></pre>
  
  <p>Question : how to remove duplicated entries in the text area. as expected result shown above</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>i got an textarea with name="listnumber"</p>
  
  <p>My Source Code:</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
  &lt;!--
   $(document).ready(function() {
      $("textarea#listnumber").bind('input propertychange keyup cut paste',function(){
          text = $("textarea#listnumber").val()
          lines = $.unique(text.split(/\r|\r\n|\n/))
          count = lines.length
          $('input#totalnumber').val(count)
      });
  });
  --&gt;
  &lt;/script&gt;
  &lt;form action="index.php" method="post"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;label&gt;List Of Number&lt;/label&gt;&lt;textarea name="listnumber" id="listnumber" &gt;&lt;/textarea&gt;&lt;/li&gt;
          &lt;li&gt;&lt;label&gt;Total Number&lt;/label&gt;&lt;input type="text" name="totalnumber" readonly="readonly" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;a onclick="submit();" href="#" &gt;Send List&lt;/a&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and i want jquery to remove the duplicate inside the textarea with using $('textarea').change(function(){}
  but i dont know how to do this.
  any one please help.</p>