Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>With the below solution, i hope your problem is solved..</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; .tooltip { position:absolute; border:1px solid gray; border-radius: 3px; background-color:rgba(0,0,0,0.2); padding:5px; color:white; font-size: 12px; } &lt;/style&gt; &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" &gt; $(document).ready(function(){ $(".cc-head").hover(function(){ var tooltip_text = $(this).children().children().html(); //contains the data present inside 'span' element $('&lt;p class="tooltip"&gt;&lt;/p&gt;').html(tooltip_text).appendTo('body').fadeIn('slow'); //showing the tooltip }, function() { // remove the tooltip as soon as it goes outside the div $('.tooltip').remove(); }).mousemove(function(e) { var x_pos = e.pageX + 15; //calculating the position of tooltip from x-axis, pageX gives the current position of mouse pointer from x-axis var y_pos = e.pageY + 10; //calculating the position of tooltip from y-axis, pageY gives the current position of mouse pointer from y-axis // assigning the css to .tooltip $('.tooltip').css('left',x_pos); $('.tooltip').css('top',y_pos); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="man"&gt; &lt;div class="parts"&gt; &lt;div class="cc-head"&gt;&lt;a href="#"&gt;&lt;span&gt;Text Head&lt;/span&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="cc-head"&gt;&lt;a href="#"&gt;&lt;span&gt;Text Neck&lt;/span&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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. 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