<td>
<div class="resumehint"></div>
<input type="file" id="resume" />
</td>
How to get the div before "#resume" with jQuery?
That is ".resumehint"
<td>
<div class="resumehint"></div>
<input type="file" id="resume" />
</td>
How to get the div before "#resume" with jQuery?
That is ".resumehint"
$(this).prev("div")
or
$(this).prev()
or
$(this).prev(".resumehint")
you can replace $(this)
with $('#resume')
if you are outside a function.
Use the Traversing/prev function:
$('#resume').prev('div');
And if you know the CSS class of the div to be more specific:
$('#resume').prev('div.resumehint');