Jquery tooltip plugin is detecting hover event only for 1st row in datatable
I'm using
Tooltipster Plugin to create a tooltip everytime i hover over a <td> element in a datatable. To do so, i have looped over each row in the datatable and then selected the <td> element using childnode, and applied the .tooltipster() function. However, the tooltip works only for the 1st row <td> element. Any idea how to get it working for all rows ?
- $('#mytable tbody tr').each(function(){
- //childNode[7] is the <td> element on which i want the tooltip
- $(this.childNodes[7]).tooltipster({
- animation: 'fade',
- delay: 200,
- theme: 'tooltipster-punk',
- trigger: 'hover',
- interactive: 'true',
- functionBefore : function drawChart() {
- // This isnt needed to understand the problem so i have not pasted the code
- }
- });
- });
Table data
- <td class="tooltip" data-tooltip-content="#chart_div" style="padding-left:40px" id="storage" >
- <img src="@Url.Content("~/Content/images/database.png")" />
- </td>