I have a table of rows (duh) and in one of the columns, I'm trying to have two buttons appear during hover/mouseover. Right now, it's an anchor tag with a set width/height and a background placement.
This is what they appear like when not hidden:
A good example of the finished product is grooveshark's hover controls:
Basically I'm wondering how I would go about getting all the images to be hidden except the ones in a row that is currently being hovered over. Then that row would show those images but disappear once the mouse moves to a different row.
Html Code:
echo '<td><a href="/servers/detail.php?id='. $row['id'] .'">'.$row['server_name'].'</a><a id="option-favorite" class="rowOption"></a><a id="option-vote" class="rowOption"></a></td>';
JS Code:
jQuery('td').live('mouseover', function () {
jQuery(this).closest("tr").find('a.rowOption').visible();
});
visible()
is not a jquery function...Oh, andlive()
is deprecated, useon()
instead. – Hesketh