Creating a string from my matched elements
<p>I currently create two strings using the following code. One is for a load of HTML content and the other is a string of post IDs. </p>

<p>What I cant seem to do is to get the string of post IDs as a comma-separated string. I figured it has something to do with <code>.join()</code>, I just don't know how to fit it in. </p>

<pre><code>var content = '';
var postidstring = '';

jQuery('.apartment-entry-container:has(input:checked)').each(function() {
   content += jQuery(this).html();  
   postidstring += jQuery(this).find('input[type=checkbox]').val();                        
   //console.log(postidstring);                    
}); 
</code></pre>

<p>The console reads 00010002000300040005 instead of 0001,0002,0003,0004,0005 etc. </p>