title: How to make info text appear and follow the cursor when hovering over image?
body: <p>For my portfolio website, I want to include info text that becomes visible when hovering over the according image and I want the text to follow along the cursor.</p>
  <p>I'm by no means a coding expert, so I tried to achieve the effect by replacing the default cursor with an image of the text on white background via css and the cursor-property.
  However, this left me with weird gray edged around the image that the image originally doesn't have.</p>
  <p>So I figured that this was a sloppy approach anyway and that I should rather try solving it via javascript... which left me with the following code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $(document).bind('mousemove', function(e){
          $('#tail').css({
              left: e.clientX + 20,
              top: e.clientY + document.body.scrollTop
          });
      });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#tail {
  position: absolute;
  background-color: #ffffff;
  padding: 5px;
  opacity: 0;
  }
  
  #tail p {
      margin: 0px;
  }
  
  
  .project-01:hover &gt; #tail {
      opacity: 100%; 
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="project-01"&gt;
      &lt;a href="project-site-01.html"&gt;
          &lt;img src="images/project-cover-01.png" alt="Project description"&gt;
      &lt;/a&gt;
      &lt;div id="tail"&gt;
          &lt;p&gt;Project description&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I am now left with text that appears when hovering over the image and it follows the cursor properly, even if the cursor position changes due to scrolling (which it didn't do properly at first, which is why I added the 'document.body.scrollTop').
  The only problem: The info text is way to far away from the cursor. I tried adjusting the offset, adding '- 900' after 'document.body.scrollTop' but that only makes it look right with my specific browser height – if I switch to a smaller or bigger screen, the '- 900' of course doesn't fit anymore.</p>
  <p>Is there anyone who can explain what I'm doing wrong on a dummy level or even better – tell me how to fix the problem? I've been trying to get that hover text effect working for literally the past two days. HELP!</p>
  <p>PS: You can see the effect I want to create on <a href="https://playgroundparis.com" rel="nofollow noreferrer">https://playgroundparis.com</a></p>