title: Impress js Auto-play Slideshow Then End On ID
body: <p>I have a script to auto-play Impress JS, but I don't know how to end the slideshow on a certain ID  or how to stop looping the slideshow once it ends.  Any help is appreciated.</p>
  
  <pre><code>&lt;script&gt;
    var impress = impress();
    impress.init();
    document.addEventListener('impress:stepenter', function(e){
      if (typeof timing !== 'undefined') clearInterval(timing);
      var duration = (e.target.getAttribute('data-transition-duration') ? e.target.getAttribute('data-transition-duration') : 2000); // use the set duration or fallback to 2000ms
      timing = setInterval(impress.next, duration);
    });
  &lt;/script&gt;
  </code></pre>