0

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 Answer 1

1

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();
  });
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.