title: how to clear Interval on Mouse Over in java script?
body: <pre><code>    &lt;script type="text/javascript"&gt;
  var images=["cod.jpg","cod2.jpg","cod3.jpg","cod4.jpg"];
  var i=0;
  window.onload=function(){
  changeimage();
  var stopinterval = setInterval(changeimage,3000);
  }
  function changeimage(){
  if(i==images.length||i&gt;images.length){
      i=0;
  }
  
  document.getElementById('metroslider').src=images[i];
  i++;
  
  }
  function stopanim(){
      clearInterval(stopinterval);
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>**body is below **</p>
  
  <pre><code>&lt;div class="sliderbtns" onMouseMove="stopanim();"&gt;
  </code></pre>
  
  <p><strong>But its not working please help me how to stop the interval using On mousOver function .
  Thanks .</strong></p>