Tooltip Difficulties

Tooltip Difficulties

bryceray1121bryceray1121 Posts: 65Questions: 0Answers: 0
edited October 2010 in TableTools
I'm attempting to enable tooltip but am running into some problems. I have my table setup almost perfectly using datatables with out any problems. I'm now trying to enable tooltip and have run into problems. It seems when I add the line of code to enable the tooltip the styling on my table disappears. When I then remove the line the style is back to the way its supposed to be. This seems like a relativly simple task and that is why I am stumped. This is the code I'm using to enable the tooltip.

The only thing I've done differently from the tutorial on the website is attach the tooltip to td instead of tr. The tooltip is working. When I hover over a td it displays the tooltip properly. The problem is only the side affect of the table losing its styling.
[code]
jQuery('#test tbody td[title]').tooltip( {
"delay": 0,
"track": true,
"fade": 250
} );

jQuery('#test').dataTable( {
"sScrollY": "200px",
"bPaginate": false,
"sDom": '<"toolbar">frtip',
"bStateSave": false
} );
[/code]

If I instead add the tooltip post initialization it works better. However, there is still one small problem. The toolbar I added above the table disappears.

Am I doing something wrong? What could be causing this to happen?

A side question about the tooltip functionality. Is it possible to enable the use of html inside the tooltip? I would like to break my tooltip into several lines.

Replies

  • allanallan Posts: 54,880Questions: 1Answers: 8,601 Site admin
    I'm afraid I don't know off the top of my head why this would be happening. I can only guess that something in altering the classes needed for the table display, but I don't know what. Another option might be a JS error before the styles can be added. Can you post a link?

    Regarding the HTML inside the tooltip - that's probably one for the jQuery UI folks, since the tooltip is from that library, and not part of DataTables.

    Allan
This discussion has been closed.