I have this code
<div style="float:left">
<div class="d-inline ">
<i id="reply@{@item.Id}" class="bi bi-reply icon-cursor test-comment" onclick="CommentReply(@item.Id)"></i>
</div>
</div>
and js
function CommentReply(id)
{
//to do something
}
but I want to change to
$(".test-comment").click(function () {
//to do something
// I need Id in here
})
how can I pass the Id parameter to test-comment click event?