bVis - Attaching Hover Event to hidden cell

bVis - Attaching Hover Event to hidden cell

bryceray1121bryceray1121 Posts: 65Questions: 0Answers: 0
edited January 2011 in General
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

Replies

  • allanallan Posts: 63,145Questions: 1Answers: 10,404 Site admin
    I might be being daft here - but why would you want a tooltip on a hidden cell? :-) Can it be made visible using ColVis or something?

    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
This discussion has been closed.