jQuery: filtering elements with multiple criteria
<p>so here's the basic idea. I have a list of links, and an array of href values, I want to filter the links so that my list only contains the links that have an href value that exists in the array.  I can do this like so:</p>

<pre><code>var filtered = unfiltered.filter(function() {
    for (var i = 0; i &lt; ids.length; i++)
        if ($(this).is('a[href$=' + ids[i] + ']')) return true;
});
</code></pre>

<p>Is this the best way to achieve what I'm looking for?  </p>
