title: jQuery Target classes separately
body: <p><br>
  <strong>I have a HTML code like this.</strong></p>
  
  <pre><code>&lt;!-- Every time string is different --&gt;
  &lt;span class="time_string"&gt;123456789&lt;/span&gt; 
  &lt;span class="time_string"&gt;981251100&lt;/span&gt;
  &lt;span class="time_string"&gt;051036626&lt;/span&gt;
  &lt;span class="time_string"&gt;016165656&lt;/span&gt;
  </code></pre>
  
  <p><strong>I want Jquery change the time string to date</strong></p>
  
  <pre><code>&lt;!-- Look every date is different --&gt;
  &lt;span class="time_string"&gt;25 March 2017&lt;/span&gt; 
  &lt;span class="time_string"&gt;28 April 2017&lt;/span&gt;
  &lt;span class="time_string"&gt;14 January 2017&lt;/span&gt;
  &lt;span class="time_string"&gt;21 December 2015&lt;/span&gt;
  </code></pre>
  
  <p><strong>To do this I have used this Jquery Code:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      function timestr_to_date(time_string){
          // this function will convert the time string to date
      }
  
      $(document).ready(function(){
  
          // getting the time string
          var time_string = $('.time_string').html();
  
          // converting the time string to date by using function
          var date = timestr_to_date(time_string);
  
          // replacing the time_string to date
          $('.time_string').html(date);
  
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>But it I got every date same</strong></p>
  
  <pre><code>&lt;!-- PROBLEM: Every date are same --&gt;
  &lt;span class="time_string"&gt;25 March 2017&lt;/span&gt; 
  &lt;span class="time_string"&gt;25 March 2017&lt;/span&gt;
  &lt;span class="time_string"&gt;25 March 2017&lt;/span&gt;
  &lt;span class="time_string"&gt;25 March 2017&lt;/span&gt;
  </code></pre>