How to get the index of a particular element
<p>I got the following code from the designer:</p>

<pre><code>&lt;table class="items"&gt;
    &lt;thead&gt;
    &lt;tr&gt;
        &lt;th id="name"&gt;name&lt;/th&gt;
        &lt;th id="category"&gt;category&lt;/th&gt;
        &lt;th id="zip"&gt;zip&lt;/th&gt;
        &lt;th id="city"&gt;city&lt;/th&gt;
        &lt;th id="street"&gt;street&lt;/th&gt;
        &lt;th id="latitude"&gt;latitude&lt;/th&gt;
        &lt;th id="longitude"&gt;longitude&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr class="odd"&gt;
            &lt;td&gt;MyCompany&lt;/td&gt;
            &lt;td&gt;Company&lt;/td&gt;
            &lt;td&gt;18360&lt;/td&gt;
            &lt;td&gt;Stroudsburg&lt;/td&gt;
            &lt;td&gt;4 Scott Str.&lt;/td&gt;
            &lt;td&gt;40.9891&lt;/td&gt;
            &lt;td&gt;-75.1962&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>Using jQuery, how can I get the longitude and latitude values by taking into account the <code>th</code> elements with the specified <code>id</code>? The order of the columns might change later so direct indexing is not an option. However the <code>id</code> values will remain the same.</p>
