I’m trying to access the first div with a class from hovering on a table row;
Here is my html:
<table id='search_job_results_table'>
<tbody>
<tr>
<td><div style='position:relative'><div class='search_job_tooltip'>blah blah</div></div></td>
</tr>
</tbody>
</table>
I’ve tried with the following:
$(function () {
$('table#search_jobs_result_table tbody tr').mouseover(function () {
$(this).children().next('div.search_job_tooltip').css('display', 'block');
});
});
The hovering works part works, as I can wak an alert in there and it triggers, but not setting the css of that div. I always get stuck on this for some reason, any ideas?
you can use
find()method and instead of.css('display', 'block');you can useshow()method.