Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
How to add tooltip to td in a table

Can someone give me an example of adding a tooltip whenever I hover a td in a table.

The content of the tooltip must come from database records.

Example:

If I hover A name on a table.. the tooltip must display his/her information.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Use the title attribute:

<table>
    <tr>
        <td>
            <a href="#" title="John Smith lives in New York."> John Smith </a>
        </td>
    </tr>
</table>

Live demo: http://jsfiddle.net/GpU5f/

over 4 years ago · Santiago Trujillo Relatório

0

You'll get a tooltip on hover if you add 'title="whatever"' to the <td>:

<tr><td title="whatever">hover here to see "whatever" in a tooltip</td>

Where the title content comes from is a different and perhaps more difficult story, but perhaps you can arrange for the program code that is providing the cell's innerText to do the same for the cell's title=....

HTH

-- pete

over 4 years ago · Santiago Trujillo Relatório

0

since the original question was tagged jquery and none of the examples mention this (however trivial), it's just a matter of

$(tdSelector).attr('title', titleText);

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda