jquery - making a compound selector
<p>I've got several buttons that have the same class but apply to different data (albums), so I added an ID to differentiate between them. Because each album has a unique ID, I don't have to worry about having more than one ID on a page:</p>

<pre><code>&lt;button class="addalbum" id="add&lt;?php echo $a-&gt;album_id; ?&gt;"&gt;Add album&lt;/button&gt;

so the IDs would look like: #add121, #add122, etc. 
</code></pre>

<p><strong>How do I select one of these ids for a jQuery function?</strong> I tried the code below:</p>

<pre><code>var a = $(elm).attr('id');

$('.addalbum' + a).click(function() {
//stuff here
});
</code></pre>
