title: jquery on('click') handler for multiple elements referenced by vars
body: <p>N.B. I'm aware that I add ids and combine these in a selector e.g. "#myDiv1,#myDiv2" so please refrain from suggesting this as it does not relate to my question.</p>
  
  <p>Is there a way to 'chain' the vars below together in one on() declaration maybe as an array or something?</p>
  
  <pre><code>var myDiv1 = $('&lt;div&gt;Something here&lt;/div&gt;');
  var myDiv2 = $('&lt;div&gt;Something else here&lt;/div&gt;');
  
  myDiv1.on('click', function(){ doSomething();});
  myDiv2.on('click', function(){ doSomething();});
  </code></pre>
  
  <p>I have a bunch of vars that I need to do some broad tracking of mouse events and it feels messy setting them up individually like the above example.</p>