Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery Tool Tip Selected Nested Div for Display Problem
    primarykey
    data
    text
    <p>I have a list of information around 30-50 rows each one requiring their own unique tool tip. I know I could make these all unique IDs but that would be a lot of wasted javascript. I am trying to have jquery return the tooltip of the nested <code>&lt;DIV&gt;</code> with the class of "show_tooltip" inside any <code>&lt;DIV&gt;</code> with the class of "tool_tip". All the tool tips will be unique.</p> <pre><code>&lt;DIV class="tool_tip"&gt; &lt;DIV&gt;Content here&lt;/DIV&gt; &lt;DIV style="display:none;" class="show_tooltip"&gt;Any tool tip information goes here with possible html&lt;/DIV&gt; &lt;/DIV&gt; &lt;DIV class="tool_tip"&gt; &lt;DIV&gt;Content here&lt;/DIV&gt; &lt;DIV style="display:none;" class="show_tooltip"&gt;Another but different tool tip to be displayed&lt;/DIV&gt; &lt;/DIV&gt; </code></pre> <p>I have tried the following script but it always returns the first <code>&lt;DIV&gt;</code> with a class of "show_tooltip" it finds and repeats that for every row. Here is the script I have tried:</p> <pre><code>$(".tool_tip").tooltip({ bodyHandler: function() { return $("div.tool_tip").children(".show_tooltip").html(); }, showURL: false }); </code></pre> <p>I am using the following tool tip plugin: <a href="http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/" rel="nofollow">http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ </a></p> <p>EDIT:</p> <p>Thanks for the answer below. My resulting code that worked was:</p> <pre><code>$(".tool_tip").tooltip({ bodyHandler: function() { return $(this).find('.tooltip_content').stop().html(); }, showURL: false }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload