jquery delete table column
<p>i have table, and can not chanche markup</p>

<pre><code>&lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;
             blablabla
          &lt;/th&gt;
              &lt;th&gt;
              blablabla
           &lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
           &lt;tr&gt;
             &lt;td&gt;
                efgd
             &lt;/td&gt;
             &lt;td&gt;
                   efghdh
             &lt;/td&gt;
            &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>here function to delete column. on cell click</p>

<pre><code>function (menuItem, menu) {
             var colnum = $(this).prevAll("td").length;

             $(this).closest('table').find('thead tr th:eq('+colnum+')').remove();
             $(this).closest("table").find('tbody tr td:eq('+colnum+')').remove();

             return;
         }
</code></pre>

<p>but it delete something, not as i want, where am i wrong?</p>
