title: jQuery get table width of cells and assign the same to different table of same location/index
body: <p>I have started learning jQuery, but weak with syntax as of now.</p>
  
  <p>I have two table's as below:-</p>
  
  <pre><code>&lt;table class="tableone"&gt;
    &lt;thead&gt;
      &lt;th width="30px"&gt;ID&lt;/th&gt;
      &lt;th width="150px"&gt;NAME&lt;/th&gt;
      &lt;th width="100px"&gt;Age&lt;/th&gt;
    &lt;/thead&gt;
  &lt;/table&gt;
  &lt;table class="tabletwo"&gt;
    &lt;tbody&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;John&lt;/td&gt;
      &lt;td&gt;32&lt;/td&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Where tableone has some dynamic width at run time. I need to get the width of column and assign the same to tabletwo same column index.</p>
  
  <p>so, that after the code run's the HTML should be like :-</p>
  
  <pre><code>&lt;table class="tabletwo"&gt;
    &lt;tbody&gt;
      &lt;td width="30px"&gt;1&lt;/td&gt;
      &lt;td width="150px"&gt;John&lt;/td&gt;
      &lt;td width="100px"&gt;32&lt;/td&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I was trying the same using jQuery where I was trying to loop thru the rows and get the width. While doing so, I can capture the index of the column and access the tabletwo. But I am not sure about the syntax.</p>
  
  <pre><code>$(document).ready(function() {
    /* looping into the th*/
    $("table.tableone thead").find('th').each(function(index,value) {
      console.log(index);
      console.log(value);
    })   
  });
  </code></pre>