Write the following code in the aspx page:
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Show Gridview Rows Details in tooltip with jQuery</title>
<scriptsrc="http://code.jquery.com/jquery-1.8.2.js"type="text/javascript"></script>
<%--<script src="jquery.tooltip.min.js" type="text/javascript"></script>--%>
<scriptsrc="jquery-tooltip/jquery.tooltip.min.js"type="text/javascript"></script>
<scripttype="text/javascript">
function InitializeToolTip() {
$(".datalistToolTip").tooltip({
track: true,
delay: 0,
showURL: false,
fade: 100,
bodyHandler: function () {
return $($(this).next().html());
},
showURL: false
});
}
</script>
<scripttype="text/javascript">
$(function () {
InitializeToolTip();
})
</script>
<styletype="text/css">
#tooltip {
position:absolute;
z-index:1000;
border:none;
background-color:white;
padding:0px;
opacity:0.50;
}
#tooltiph3,#tooltipdiv { margin:0; }
</style>
</head>
<body>
<formid="form1"runat="server">
<div>
<br/>
<br/>
<br/>
<br/>
<asp:DataListID="DataList1"runat="server"RepeatDirection="Horizontal">
<ItemTemplate>
<asp:LabelID="Label1"runat="server"Text='<%# Eval("Name")%>'Visible="false"></asp:Label>
<ahref="#"><asp:ImageID="Image1"runat="server"ImageUrl='<%# Eval("image_path")%>'Width="50px"Height="50px"CssClass="datalistToolTip"/>
<divid="tooltip"style="display:none;">
<table>
<tr>
<td><%# Eval("Name")%></td>
</tr>
</table>
</div></a>
</ItemTemplate>
</asp:DataList>
<br/>
</div>
</form>
</body>
</html>