title: jQuery multiple selectors as variables
body: <p>I need help with jQuery's multiple selectors. I understand how it works and have used it but I need to use it in a way that the element names aren't in the function. (They're being passed as variables due to them being dynamically created)</p>
  
  <p>Here's an example of what I have:</p>
  
  <pre><code>function openBox(row) {
      var rowInfo = '#info' + row;
      var rowClose = '#close' + row;
      var rowNumber = '#number' + row;
      $(rowInfo).slideDown('slow');
      $(rowClose).slideDown('slow');
      $(rowNumber).slideDown('slow');
  }
  </code></pre>
  
  <p>While this is fine and works, I was hoping to clean it up a bit and find use of jQuery's multiple selectors (or something of the kind) but I noticed when passing variables this way, it doesn't seem to work but doesn't throw any errors as to why.</p>
  
  <p>Example of what I want:</p>
  
  <pre><code>function openBox(row) {
      var rowInfo = '#info' + row;
      var rowClose = '#close' + row;
      var rowNumber = '#number' + row;
      $(rowInfo, rowClose, rowNumber).slideDown('slow');
  }
  </code></pre>
  
  <p>Is this possible? Unfortunately their documentation doesn't go into great length about passing anything other than html elements. <a href="https://api.jquery.com/multiple-selector/" rel="nofollow noreferrer">source</a></p>