title: Countdown timer built on PHP and jQuery?
body: <p>After spending the last 45 minutes looking around for a solution, I can't seem to find an easy solution to creating a countdown timer using PHP and jQuery. Most already built scripts I've found are based purely on jQuery which require a ton of code, and more parameters then they should, plus, adaptability is pretty hard.</p>
  
  <p>Here's my situation;</p>
  
  <p>PHP:</p>
  
  <p><code>$countdown = date("h:i:s"); // This isn't my actual $countdown variable, just a placeholder</code></p>
  
  <p>jQuery:</p>
  
  <pre><code>$(document).ready(function name() {
      $("#this").load( function() {  
          setTimeout("name()", 1000)
        }
      }
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <p><code>&lt;div id="this"&gt;&lt;?php echo($countdown); ?&gt;&lt;/div&gt;</code></p>
  
  <p>My idea is that, every second, <code>#this</code> is reloaded, giving a new value to it's contents, and as $countdown isn't a static variable, a new value will be loaded each time. This removes the need to deal with sessions (as a basic javascript countdown timer would reset on pageload, etc).</p>
  
  <p>I would've though this would have worked, until I realized that the event binder <code>.load()</code> doesn't reload <code>#this</code> (I know silly me), so I guess what I'm wondering  is - is there an event binder I can use to make this work or is there a way to get the functionality I'm looking for, without using a jQuery plugin (which doesn't match exactly what I want anyway)?</p>