title: Click through a series of divs
body: <p>I have a similar setup to the code below where a gallery type link opens up a div with a dark background and an enlarged image (like this: <a href="https://codepen.io/ongtiffany/pen/BoOeQV" rel="nofollow noreferrer">https://codepen.io/ongtiffany/pen/BoOeQV</a>).</p>
  
  <p>What I want to do is link these lightbox div's to one another (with left and right arrows) so that you can close the currently open div and open the correct adjacent div, effectively switching between the enlarged images.</p>
  
  <pre><code>&lt;div class="lightbox" id="1"&gt;
      &lt;div class ="lightbox_content"&gt;Some stuff here.&lt;/div&gt;
      &lt;a href="#lightbox_2"&gt;&lt;div class ="lightbox_r"&gt;&amp;rarr;&lt;/div&gt;&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="lightbox" id="1"&gt;
      &lt;a href="#lightbox_1"&gt;&lt;div class ="lightbox_l"&gt;&amp;larr;&lt;/div&gt;&lt;/a&gt;
      &lt;div class="lightbox_content"&gt;Some stuff here.&lt;/div&gt;
      &lt;a href="#lightbox_3"&gt;&lt;div class="lightbox_r"&gt;&amp;rarr;&lt;/div&gt;&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="lightbox" id="3"&gt;
      &lt;a href="#lightbox_2"&gt;&lt;div class ="lightbox_l"&gt;&amp;larr;&lt;/div&gt;&lt;/a&gt;
      &lt;div class="lightbox_content"&gt;Some stuff here.&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Any help would be amazing - thanks!</p>