title: How can I decrease the value of an HTML element each second using jQuery?
body: <p>Here's what I have so far:</p>
  
  <pre><code>var timer = setInterval(function () {
      $(".auctiondiv .auctiondivleftcontainer .countdown").text(sec--);
  }, 1000);
  </code></pre>
  
  <p>This works fine, but the problem arises because I have to set the value of <code>sec</code> on startup and every countdown element on my page has the same value. So instead of saving the value and decreasing that, maybe it's best to just get the value each tick and decrease it - without saving the value anywhere in Javascript.</p>
  
  <p>How can I grab the text inside of the .countdown element (a <code>&lt;p&gt;</code> tag) and subract one from it and assign it back to the same <code>&lt;p&gt;</code> element? What has me confused is that there are many .countdown elements on my page, how would I go through each one? </p>
  
  <p>I also need to make sure that a .countdown value once it reaches zero, I can do something. A conditional so to speak. I imagine I can use <code>.parent()</code> on it, but we'll see.</p>
  
  <p>Any guidance?</p>