title: Moment.js text formatting and classes
body: <p>First time posting.  So I have to format some text in a element that looks like this </p>
  
  <pre><code>&lt;div class="entry-time"&gt;
    2012-05-30T20:11:06+00:00 
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to format this out to something more readable with <a href="http://momentjs.com/docs/" rel="nofollow">moment.js</a>. I can only do this from the front end with javascript.  I wrote a function that looks like this.</p>
  
  <pre><code>$(document).ready(function() {
      function formatDate(date) {
          formattedDate = date.text();
          var d = moment(formattedDate, "YYYY-MM-DDTHH:mm:ss");
          $(date).html( d.format("dddd, MMMM Do YYYY, h:mm:ss a"));
      };
  
      formatDate($('.entry-date'));
  });
  </code></pre>
  
  <p>This works if there is one element but when there are multiple elements it will format everything into one date.  I know this has something to do with jQuery pulling in an array of elements but I have no idea how to do what I did to each element with the class of entry-date.</p>
  
  <p>Can anyone help? Thank you in advance.</p>