Is it possible to use an array for attribute comparison in jQuery?
<p>I'm writing jQuery code where I need to check if link is an image. Currently code looks like this: </p>

<pre><code>$('a[href$=".png"]').click(function() {
    // do something smart
});
</code></pre>

<p>Is it possible to have an array of attributes in the code, to check for multiple formats, something like this:</p>

<pre><code>$('a[href$=.jpg],a[href$=.jpeg],a[href$=.png]').click(function() {
    // do something even smarter
});
</code></pre>

<p>What is the best practice here? Thanks!</p>
