Attaching events to two items in JQuery
<p>I would like to create a click event that will work when two different items are clicked. 
Is there a way to do this?</p>

<p>For example, normally what I'd do is this:</p>

<pre><code>&lt;a id="link1" onclick="doSomething()"&gt;link1&lt;/a&gt;
&lt;a id="link2" onclick="doSomething()"&gt;link2&lt;/a&gt;
</code></pre>

<p>But what I would like to know is whether there is any event overloading of sorts, perhaps like:</p>

<pre><code>&lt;script&gt;
$("#link1", "#link2").click(function () { 
 alert('doSomething');

 });
&lt;/script&gt;
</code></pre>

<p>Thanks</p>
