title: JavaScript clearInterval doesn't work with drag and drop
body: <p>I'm trying to count up a variable if the draggable is over an image.
  It counts very well. But I wanna to stop it, if its out or dropped. This is not working.</p>
  
  <pre><code>    var d = 0;
      function time() {
        if (d &lt; 1000) {
          d++;
          document.getElementById('zun').innerHTML = d;
        } else {
          window.clearInterval(interval);
        }
      }
  
  
      $( "#hand" ).draggable({    
        revert: true, 
        revertDuration: 800,  
  
      });
      $("img.dropimg").droppable({
        accept: '#hand',
        over: function(event, ui) {
  
         var interval = window.setInterval('time()', 1000);
  
       },
  
       out: function(event, ui) {
         window.clearInterval(interval);
  
       },   
       drop: function() { 
         window.clearInterval(interval);
       }
     });
  </code></pre>