an array of strings as a jQuery selector?
<p>I have an array of strings that are valid jQuery selectors (i.e. IDs of elements on the page): </p>

<pre><code>["#p1", "#p2", "#p3", "#p4", "#p5"]
</code></pre>

<p>I want to select elements with those IDs into a jQuery array. This is probably elementary, but I can't find anything online. I could have a for-loop which creates a string <code>"#p1,#p2,#p3,#p4,#p5"</code> which could then be passed to jQuery as a single selector, but isn't there another way? Isn't there a way to pass an array of strings as a selector?</p>

<p><strong>EDIT:</strong> Actually, there is <a href="http://stackoverflow.com/questions/201724/easy-way-to-turn-javascript-array-into-comma-separated-list/201733">an answer out there already</a>.</p>
