Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Tooltips not working in DataTables


Hello,
Is there a restriction for using tooltips in DataTables? I was testing random json data file with custom JS file which is custom.js. HTML rendered symbol for tooltips as needed but when I hover on blue symbols with first capital letters of name and surname tooltips not

Here is link for you to inspect:
The issue is in the table with title 'Temin Tarihi Kritik Olan Talepler'


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


I was searching for tooltips on the web and found an example here:

Is it possible to use metronics default tooltips for a symbols inside DT cells?
ps: mine is not working. You can inspect my test page from the link given above.



Hi,

If you are dynamically loading/rendering your datatable rows you should initialize the tooltip for newly loaded rows:


var table = $("#example").DataTable(); 
table.on( "draw", function () {
KTComponents.init();
} );


For more info on the Metronic core components init please refer to this doc page.

if you need any further help please do let us know.

Regards.



Thank you for your reply!
I added the code to my JS code for DT rendering. But tooltips did not initialized, somehow.
I updated link: You can test by hovering on name initials at datatable symbols35 at 'Talep Eden' column.

Also you can check JS code here:



Hi,

I have tested your page and tried to call KTComponents.init() in the console and it worked fine:

<img src="https://i.imgur.com/TgCL1LS.png" class="w-100"/>

Can you please debug your code and make sure that KTComponents.init() is executed after table init?

Regards.



You were right! Thank you, it worked.
I pasted part "KTComponents.init();" from

table.on( "draw", function () {
KTComponents.init();
} ); */

into
"initComplete": function () {
animationContainer.remove();
loadingContainer.classList.add('completed');
KTComponents.init(); //KT tooltips
},

it worked. I already has init. function happy
Have a good day!



Hi happy,

Great! Glad to hear that. If you need any further clarifications please do let us know. All the best with your project

Regards.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(