title: javascript / jquery time count down
body: <p>I want to make a function either using pure Javascript or also benefiting from jquery to count down to an ending time such as:</p>
  
  <pre><code>//consumes a javascript date object
  function countDown(endtimme){
  ...
  }
  </code></pre>
  
  <p>and it should display in html such as</p>
  
  <pre><code>&lt;div id="time_left_box"&gt;
      &lt;h1&gt;Time remaining&lt;/h1&gt;:
  
      &lt;p&gt;hours left: ..remaining day will be here## &lt;p&gt;
      &lt;p&gt;minutes left: ##remaining day will be here## &lt;p&gt;
      &lt;p&gt;seconds left: ##remaining day will be here## &lt;p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Indeed and it would be even more great if it can refresh itself every second.</p>
  
  <p>I am very naive with javascript and confused about how to approach, any help would be appreciate.</p>