title: JavaScript - On click on undefined number of elements to toggle multiple elements
body: <p>I have a table that needs to have an undefined number of rows that should display a set number of elements when clicked (in this case div, because I read that it's the best way to use toggle on tr). Best I could do is make it for an already set number of elements...   </p>
  
  <p><a href="https://jsfiddle.net/mpasd/2zwpjgq1/7/" rel="nofollow noreferrer">jsfiddle.net</a> - <del>This is with the set number of elements.</del>Working code..</p>
  
  <p><del>And this is all I got so far trying to figure it out.</del><br>
  Working js code:</p>
  
  <pre><code>$('.warning').on('click', function(e) {
    var $ele = $(this).nextUntil('.warning').find('td &gt; div');
      $ele.slideToggle();
    });
  });
  </code></pre>
  
  <p>In this case, I need each clicked table row to display three corresponding divs.<br>
  Obviously, answer with jQuery but I would appreciate a solution in vanilla js as well.  </p>
  
  <p>EDIT: I am sorry, I neglected to mention I want to add a sliding animation. And slideToggle doesn't seem to work...  </p>
  
  <p>EDIT2: Marked best answer by Terry.<br>
  Changed fiddle to working code.</p>