Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>9000's comment is correct. The trick is having access to a <code>&lt;span&gt;</code> that you know will be rendered on a single line. You can do that by wrapping the first word of your block in a span with a specific <code>id</code>, you could also use the last word or some other single word; there are cases where a single word will cross lines but the first word should be safe.</p> <p>Once you have something that is only on one line you can compare its height to the height of the <code>&lt;span&gt;</code> that will get the tooltip. If the <code>&lt;span&gt;</code> that is getting the tooltip is taller than the single-line <code>&lt;span&gt;</code> then it has wrapped to multiple lines.</p> <p>Try this jsfiddle:</p> <blockquote> <p><a href="http://jsfiddle.net/ambiguous/JbMhZ/1/" rel="noreferrer">http://jsfiddle.net/ambiguous/JbMhZ/1/</a></p> </blockquote> <p>Adjust the size of the right panes until the red text wraps but the green text doesn't. Then hit <strong>Run</strong> in the toolbar at the top and it should say this at the bottom of the <em>Result</em> pane:</p> <pre><code>#has-break spans more than one line #no-break spans only one line </code></pre> <p>I'm not exactly proud of this hack but it should work.</p> <p>I'm left wondering if a better positioning algorithm for your tooltip would be a better idea. Maybe pull the mouse coordinates out of the hover event and use that to position the tooltip rather than positioning it based on the <code>&lt;span&gt;</code>.</p>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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