Using tooltip to show table row details (jQuery)

I can show dynamic values ​​on jsp page in table format. And I want to implement the mouseover / hover function (in jQuery) to display every row in my table (on the jsp page). I am sharing some of the code here:

<table name="table" id="table" class="table" cellpadding="4" cellspacing="2" border="1" bgcolor="" >
<tr>
<th><input type="checkbox" name="allCheck" onclick="selectallMe()"></th>
<th>Emp ID</th>
<th>Emp Name</th>
</tr>
<tr class="tr" id="tr">
<%while(rs.next()){ %>
<td><input type="checkbox" name="chkName" onclick="selectall()"></td> 
<td><input type="text"  name="empId" value="<%= rs.getString(1)%>" disabled="disabled"  maxlength="10"></td>
<td><input type="text"  name="empName" value="<%= rs.getString(2)%>" disabled="disabled" maxlength="10"></td>
</tr>
<% } %>
</table>

For this I will have to use jQuery DataTable and mouseover () / hover or something else.

What should be the right way?

+5
source share
1 answer

Take a look at the following link, which will explain more about hovering,

http://jqfaq.com/how-to-highlight-rows-in-a-table-on-mouse-hover/

_mousehover, . . ?

: tr info mousehover,

// Do this in _mousehover
$currentRow = $(event.target).closest('tr');
$currentRow.attr("title", $currentRow.attr("id"));

. tr. , .

+4

All Articles