Search code examples
jqueryuser-interfacetooltip

Is it possible to use jQuery UI tooltip on a table row?


I've searched for two hours, found this question asked a zillion times but never really answered:

Can I get the jQuery UI to give me a tooltip popup on mouseover of a table row? I've tried this:

$('*').tooltip({ content: "hello world" });

Which gives me the tooltip on some elements but not others. Any insight is much appreciated.

EDIT:

Sample of the markup:

<asp:Panel ID="pnlWrapperMainTable" runat="server">

    <!--    Main data table  -->
    <table id="tblDisplayEDD" class="c_grid_table" border="0">

        <thead>
            <tr>
                <th  class="c_grid_head">Field ID</th>
                <th  class="c_grid_head">Field Name</th>
            </tr>   
        </thead>

        <tbody>

        <asp:Repeater ID="rptrMainTable" runat="server">
            <ItemTemplate>
                <tr class="c_grid_row">
                    <td class="c_grid_cell" style="text-align: left;">   
                    <%#Eval("FieldID")%></td>
                    <td class="c_grid_cell"><%#Eval("FieldName")%></td>
                </tr>
            </ItemTemplate>

            </asp:Repeater>

        </tbody>

    </table>

</asp:Panel>

Solution

  • Hours of trial and error revealed the simple solution: any control you want to have a tooltip must have a 'Title' property. Title = '' will do fine, and you can change the value of the 'title' tag on mouseover.