title: How to make textbox values unique which are present in html table?
body: <p>I have a html table with data like </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;abc&lt;/td&gt;
      &lt;td&gt;781&lt;/td&gt;
      &lt;td&gt;&lt;input id="barcodedb0" class="hide" type="text" /&gt;&lt;input id="barcode0" class="hide" type="text" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;abc&lt;/td&gt;
      &lt;td&gt;781&lt;/td&gt;
      &lt;td&gt;&lt;input id="barcodedb0" class="hide" type="text" /&gt;&lt;input id="barcode0" class="hide" type="text" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>In jQuery</p>
  
  <pre class="lang-js prettyprint-override"><code>$('#library_info_tbl tbody').on("keyup", "tr td input:nth-child(2)", function() {
    var j = $(this).closest('tr').index();
    var barcode = $("#barcode" + j).val().trim();
    var barcodeexisting = $("#barcode" + j - 1).val().trim();
    if (barcode == barcodeexisting)
      // do something
  });
  </code></pre>
  
  <p>I am trying to tweak the above code for checking that if the barcode which the user has typed should not be same as that of other entered text inside the html table.
  I am not able to get any idea how will I do it.</p>
  
  <p>Please help!!!</p>