title: JQuery get all elements by class name
body: <p>in the process of learning javscript and jquery, went through pages of google but can't seem to get this working. Basically I'm trying to collect innerhtml of classes, jquery seems to be suggested than plain javascript, into a document.write. </p>
  
  <p>Here's the code so far;</p>
  
  <pre><code>&lt;div class="mbox"&gt;Block One&lt;/div&gt;
  &lt;div class="mbox"&gt;Block Two&lt;/div&gt;
  &lt;div class="mbox"&gt;Block Three&lt;/div&gt;
  &lt;div class="mbox"&gt;Block Four&lt;/div&gt;
  
  &lt;script&gt;
  var mvar = $('.mbox').html();
  document.write(mvar);
  &lt;/script&gt;
  </code></pre>
  
  <p>With this, only the first class shows under document.write. How can I show it all together like Block OneBlock TwoBlock Three? My ultimate goal with this is to show them comma seperated like Block One, Block Two, Block Three, Block Four. Thanks, bunch of relevant questions come up but none seem to be this simple.</p>