views:

288

answers:

1

I have a link that says remove I have hidden the like by

< div id="remove_$id" style="display:none">< /div>

and then i want to be able to roll over a < tr id="$id" > and then remove comes up only for that id and when you roll off it the remove will be hidden I cant get the jquery code right for it to work

Can some one help me please

+1  A: 

First off, give the div a class:

<div id="remove_$id" class="mydiv">
  ...
</div>

with:

div.mydiv { display: none; }

and

$(function() {
  var id = this.id;
  $("tr").hover(function() {
    $("#remove_" + id).show();
  }, function() {
    $("#remove_" + id).hide();
  });
});
cletus