Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
Angular Datatable: How to get tooltip of column data while hovering

I have one datatable. how to get tooltip while hovering on table cells? Tried the below type, the tooltip is populating. How to get the same using angular?

 $(document).on("mousemove", "tr td", function () {
  var colVal = $(this).text();
 $(this).prop("title", colVal);
});

Working Stackblitz

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can achive that pretty easy with implementing bootstrap. something like this should do the trick:

<tbody>
  <tr *ngFor="let person of persons">
    <td data-container="body" data-toggle="tooltip" data-placement = "bottom" title="{{yourTooltip.content}}" >
       <input type="checkbox" [disabled]="person.firstName === 'Superman'"
       class="checkboxCls" [value]="person.checked" [checked]="person.checked"
       name="id" (change)="person.checked = !person.checked">
   </td>
    <td data-container="body" data-toggle="tooltip" data-placement = "bottom" title="{{yourTooltip.content}}">{{ person.id }}</td>
    <td data-container="body" data-toggle="tooltip" data-placement = "bottom" title="{{yourTooltip.content}}">{{ person.firstName }}</td>
    <td data-container="body" data-toggle="tooltip" data-placement = "bottom" title="{{yourTooltip.content}}">{{ person.lastName }}</td>
  </tr>
</tbody>

Don't forget to always add data-container="body" otherwise the tooltip will move the table cells to the right a bit on hover.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!