title: JavaScript equivalent to JQuery .next()
body: <p>Is there a JavaScript method similar to jQuery .next()? I want to find the next element that has the class of "error" relative to the element. I've tried using <code>.nextSibling</code> as a loop but couldn't figure it out. Didn't know if there was an easier way to go about it without jQuery.</p>
  
  <p>For instance, if I have this code:</p>
  
  <pre><code>&lt;div id="section"&gt;
      &lt;div id="test"&gt;test&lt;/div&gt;
      &lt;span class="info"&gt;Information&lt;/span&gt;
      &lt;span class="error"&gt;Error!&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to get the next <code>.error</code> class closest to <code>#test</code>, if I have a <code>#section2</code> and a <code>#test2</code> I would want to get the <code>.error</code> class closest to <code>#test2</code> and so on.</p>