title: JQuery setInterval is not working after multiple hover sequence
body: <p>I'm trying to emulate the footer of a powerpoint presentation. So this is the 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>$(function() {
          $('.presentation').on({
            mouseleave: function() {      
     setInterval(function () {
     if(!$("input").is(":focus") &amp;&amp; !$(".presentation:hover").length &gt; 0 &amp;&amp; !$('.bp-controls').hasClass('show')){    
           $('.bp-controls').fadeOut(); 
                 $('.bp-controls').removeClass('show');       
             }
         }, 4000);
            },
            mouseenter: function() {
     $('.bp-controls').fadeTo(500, 1, function() {
             // Animation complete.
          $('.bp-controls').addClass('show');
               });             
             }
          });
        });</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="presentation"&gt;
           &lt;img src="Main.png" width="50%"&gt;
           &lt;div class="bp-controls"&gt;&lt;input type="number" pattern="[0-9]*"&gt;&lt;/div&gt;
          &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I don't understand why setInterval works the first and maybe the second time when the document is ready but then it doesn't work anymore.</p>