title: jQuery hover : fading in a hidden div while fading out the "default" one
body: <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>$(function() {
    $('#wrap').hover(
      function() {
        $('#wrap .image').fadeOut(100, function() {
          $('#wrap .text').fadeIn(100);
        });
      },
      function() {
        $('#wrap .text').fadeOut(100, function() {
          $('#wrap .image').fadeIn(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 id="wrap"&gt;
    &lt;div class="image"&gt;
      &lt;img src="http://example.com/images/image.png"&gt;
    &lt;/div&gt;
    &lt;div class="text hide"&gt;
      &lt;p&gt;Text text text&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have two divs (one of them hidden with CSS), which I'm fading in and out in alternance inside a common space, on hover.</p>
  
  <p>And I was applying this jQuery code to fade out the image - and fading in the text, on hover    </p>
  
  <p>But the problem is that the text div gets sticky and won't fade out - always that the mouse movement is too quick.</p>
  
  <p>Do you know where can it be the solution to this?</p>
  
  <p>I set up an online test : <a href="http://paragraphe.org/stickytext/test.html" rel="nofollow noreferrer">http://paragraphe.org/stickytext/test.html</a></p>
  
  <p>Thanks for any tip</p>