bVis - Attaching Hover Event to hidden cell
bVis - Attaching Hover Event to hidden cell
bryceray1121
Posts: 65Questions: 0Answers: 0
I'm using custom tooltips with data tables. These tooltips are attached to each individual cell. I've run into a problem where I am unable to attach the hover event required for the tooltips to cells in columns which are hidden by default.
Searching google I found:
"will not work if a div is hidden with display:none and unhidden with CSS-hover property. This is because display:none will generate no box for the div. workaround: use visibility: hidden. "
Is this the case with the way bVis works in datatables? Is there a work around to be able to attach hover events to hidden cells?
Thanks for your help
Searching google I found:
"will not work if a div is hidden with display:none and unhidden with CSS-hover property. This is because display:none will generate no box for the div. workaround: use visibility: hidden. "
Is this the case with the way bVis works in datatables? Is there a work around to be able to attach hover events to hidden cells?
Thanks for your help
This discussion has been closed.
Replies
If you are referring to DataTables' ability to make hidden columns (which ColVis uses), then it's not just a display: none, it has actually been removed from the DOM. What you can do is loop over the settings aoColumns array and take the nTh property. So:
[code]
var o = oTable.fnSettings();
for ( var i=0, iLen=o.aoColumns.length ; i