In the following structure
<div class="thisNot">
<table style="width:100%" class="thisOneUknow">
<tr>
<th id="imhere">Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
</div>
If I'm on the $('#imhere'), How I can find the closest parent with a class and extract that value? In this case get thisOne (always thinking that i'm standing imhere element)
EDIT: the class thisOneOknown is generated automatically, so this changed on every Page Load, so the selector has been capable to find the first parent with class and store/return it . Somethinng like var closestParentClass = $('#imhere').closest(":hasParent()");