title: Validate a table column
body: <p>How to validate a specific column in a HTML table by click function in javascript or jQuery?</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-html lang-html prettyprint-override"><code>&lt;table class="table table-bordered table-striped table-responsive" id="tableid"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th class="check-col"&gt;
          &lt;label&gt;
            &lt;input id="check_all" type="checkbox" name="check"&gt; 
            &lt;span class="label-text table-header-check"&gt;&lt;/span&gt;
          &lt;/label&gt;
        &lt;/th&gt;
        &lt;th class="other-col"&gt;ID&lt;/th&gt;
        &lt;th&gt;URL&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody id="table-body"&gt;
      &lt;tr id="td"&gt;
        &lt;td class="check-col"&gt;
          &lt;label&gt;
         &lt;input class="select_option" type="checkbox" name="check"&gt; 
            &lt;span class="label-text"&gt;&lt;/span&gt;
          &lt;/label&gt;
        &lt;/td&gt;
        &lt;td id="table_id" name="id" contenteditable='true' class="other-col"&gt;1&lt;/td&gt;
        &lt;td id="table_url" name="url" contenteditable='true'&gt;https://fb.com&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr id="td"&gt;
        &lt;td class="check-col"&gt;
          &lt;label&gt;
        &lt;input class="select_option" type="checkbox" name="check"&gt; 
            &lt;span class="label-text"&gt;&lt;/span&gt;
          &lt;/label&gt;
        &lt;/td&gt;
        &lt;td id="table_id" name="id" contenteditable='true' class="other-col"&gt;2&lt;/td&gt;
        &lt;td id="table_url" name="url" contenteditable='true'&gt;http://twitter.com/&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr id="td"&gt;
        &lt;td class="check-col"&gt;
          &lt;label&gt;
        &lt;input class="select_option" type="checkbox" name="check"&gt; 
            &lt;span class="label-text"&gt;&lt;/span&gt;
          &lt;/label&gt;
        &lt;/td&gt;
        &lt;td id="table_id" name="id" contenteditable='true' class="other-col"&gt;3&lt;/td&gt;
        &lt;td id="table_url" name="url" contenteditable='true'&gt;http://google.com/&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;div class="buttons-section"&gt;
    &lt;button type="button" id="valid" class="btn btn-default custom-btn"&gt;VALIDATE&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>