title: Perform the same action on multiple elements
body: <p>I have this line:</p>
  
  <pre><code>$("#clients-edit-wrapper").height($(window).height()-150);
  </code></pre>
  
  <p>I would like to apply that height function to more than just that specific ID in one line of jQuery. Is there a way to chain elements together and apply that height function once for multiple elements? Basically, I want to apply that height function to 3 or 4 other DIVs but I would rather not have 3 or 4 more lines of jQuery to accomplish this.</p>
  
  <p>Is this possible?</p>
  
  <hr>
  
  <p><strong>Answer from VisioN below (shows how much of a jQuery newbie I am!):</strong></p>
  
  <p>You can use either multiple selector:</p>
  
  <pre><code>$("#clients-edit-wrapper, #div2, #div3").height($(window).height() - 150);
  </code></pre>
  
  <p>Or class selector (which is certainly better!):</p>
  
  <pre><code>&lt;!-- HTML --&gt;
  &lt;div id="clients-edit-wrapper" class="myClass"&gt;&lt;/div&gt;
  &lt;div id="div2" class="myClass"&gt;&lt;/div&gt;
  &lt;div id="div3" class="myClass"&gt;&lt;/div&gt;
  
  // JavaScript
  $(".myClass").height($(window).height() - 150);
  </code></pre>