title: Simple Javascript slideshow (so passe I know), get next slides property to show in current slide
body: <p>I am building a simple slideshow, I just need an attribute from the next slide to show on the current slide so I can say &quot;Next slide: [some title]&quot;</p>
  <p>JS code so far</p>
  <pre><code>var slides = document.querySelectorAll('.bannerSlides .bannerSlide');
  var currentSlide = 0;
  
  var slideInterval = setInterval(nextSlide,2000);
  
  function nextSlide(){
    slides[currentSlide].className = 'bannerSlide';
   currentSlide = (currentSlide+1)%slides.length;
   slides[currentSlide].className = 'bannerSlide showing';
  
  
  // Need to get H4 prop from the next slide and show it on the current slide
  }
  </code></pre>
  <p>HTML thus far</p>
  <pre><code> &lt;div class=&quot;bannerSlides&quot;&gt;
     &lt;div class=&quot;bannerSlide&quot;&gt;
      &lt;h4&gt;Slide One&lt;/h4&gt;
      &lt;div class=&quot;nextSlideIs&quot;&gt;Next slide is: [next slide h4 here]&lt;/div&gt;
    &lt;/div&gt;
     &lt;div class=&quot;bannerSlide&quot;&gt;
     &lt;h4&gt;Slide Two&lt;/h4&gt;
       &lt;div class=&quot;nextSlideIs&quot;&gt;Next slide is: [next slide h4 here]&lt;/div&gt;
     &lt;/div&gt;
    
    &lt;!-- etc. --&gt;
   &lt;/div&gt;
  </code></pre>