title: jQuery calling same function multiple times with different input to the same div name
body: <p>OK, so I am using a jQuery plugin called CountUp:  <a href="http://blog.ogulcanorhan.com/weekend-project-jquery-countup-plugin/" rel="nofollow">http://blog.ogulcanorhan.com/weekend-project-jquery-countup-plugin/</a></p>
  
  <p>The script is fairly simple:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
              $('#jq_count_up').countUp({'lang':'en', 'format':'full', 'sinceDate': 'dd/mm/YYYY-hh:mm:ss'});
      });
  </code></pre>
  
  <p></p>
  
  <p>So the jQuery takes a starting timestamp (dd/mm/YYYY-hh:mm:ss) and then returns the days, hours, minutes, seconds since the input timestamp above.  The result will be displayed in side a  tag, as shown below:</p>
  
  
  
  <p>Simple enough and it works great if you are only using the code one time on the page.  I have multiple timestamps which I am wanting to apply this script to.  The application is an email queue of how long people have been waiting.  So to try to fix this, I dynamically generated the timestamp via PHP on the server side and I also changed the name of the div so that it was unique for each of the multiple timestamps.  For example, here is the output of my PHP:</p>
  
  <p>....................</p>
  
  <pre><code>    &lt;/td&gt;&lt;td&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#jq_count_up-4').countUp({'lang':'en', 'format':'full', 'sinceDate': '04/12/2011-14:56:33'});
      });
  &lt;/script&gt;
  &lt;div id="jq_count_up-4"&gt;&lt;/div&gt;
  &lt;/td&gt;&lt;td&gt;
  </code></pre>
  
  <p>(then later on in the same HTML output:</p>
  
  <pre><code>&lt;/td&gt;&lt;td&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#jq_count_up-2').countUp({'lang':'en', 'format':'full', 'sinceDate': '04/12/2011-08:44:43'});
      });
  &lt;/script&gt;
  &lt;div id="jq_count_up-2"&gt;&lt;/div&gt;
  &lt;/td&gt;&lt;td&gt;
  </code></pre>
  
  <p>So notice that I did 2 things to try to fix this issue:</p>
  
  <ul>
  <li>I changed the name of the reference to the div name tag within the script (I think) from <code>'#jq_count_up-2'</code> to <code>'#jq_count_up-X'</code> where X is a unique number.</li>
  <li>I changed the name of the <code>&lt;div id=&gt;</code> tag so that it is unique as well, and is the same name as in #1 above.</li>
  </ul>
  
  <p>So the result is that still only one of the timestamps works, and it is the last one on the page.....   Any help would be appreciated!</p>