jQuery: performing operations on an array of objects?
<p>I have 4 jQuery objects (i.e. things constructed via <code>$("ObjectID")</code>), and I would like to perform the same operation to all of them, in an elegant fashion. I would have thought that something like these would work, but it doesn't seem to:</p>

<pre><code>$([obj1, obj2, obj3, obj4]).change(function() { otherObj.show(); });
$([obj1, obj2, obj3, obj4]).attr("disabled", "disabled");
</code></pre>

<p>Is there a good syntax for this? It seems like a somewhat blinding oversight. Currently the best I'm seeing is</p>

<pre><code>$([obj1, obj2, obj3, obj4]).each(
    function() { this.change(function() { otherObj.show(); }));
</code></pre>
