How to get the Id of corresponding th of td in a table
<p>I have a scenario like</p>

<pre><code>&lt;table&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;th id ="myid1"&gt;header1&lt;/th&gt;
            &lt;th id ="myid2"&gt;headre "2&lt;/th&gt;
            &lt;th id ="myid3"&gt;header3&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
        &lt;tr&gt;
            &lt;td&gt;v1&lt;/td&gt;
            &lt;td&gt;v2&lt;/td&gt;
            &lt;td&gt;v3&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;v10&lt;/td&gt;
            &lt;td&gt;v11&lt;/td&gt;
            &lt;td&gt;v12&lt;/td&gt;        
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;v20&lt;/td&gt;
            &lt;td&gt;v21&lt;/td&gt;
            &lt;td&gt;v22&lt;/td&gt;                    
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;v30&lt;/td&gt;
            &lt;td&gt;v31&lt;/td&gt;
            &lt;td&gt;v32&lt;/td&gt;                    
        &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>there can be thousands of row  .</p>

<p>i need to get the id of the td on which that perticulat td belongs to.</p>

<p>for example . if i click the third td of third row .. i should get the id of corresponding th , here it is myid3  (here its hard coded but it will set based on the value from server side)</p>

<pre><code>$('tbody td').live('click', function() {
    var idOfTh = ??
});           
</code></pre>
