title: How to use final countdown with Meteor/Mongodb?
body: <p>Im trying to user this <a href="http://hilios.github.io/jQuery.countdown/" rel="nofollow">http://hilios.github.io/jQuery.countdown/</a> with my meteor app. </p>
  
  <p>I would like to have feature where user submits a form and then countdown is starting from the second he sends it and I would also need to display the countdown to the user.</p>
  
  <p>Im not sure how exactly I can achieve this what im looking for. 
  Im currently doing this in template events:</p>
  
  <pre><code>Template.insertProduct.events({
  'submit form': function(event){
      event.preventDefault();
      Products.insert({
          name: "randomstring",
          startOfCountdown: new countdown("2016/01/01")
          })
  }
  });
  </code></pre>
  
  <p>This inserts a row in my "Products" collection:</p>
  
  <pre><code>meteor:PRIMARY&gt; db.products.find()
  { "_id" : "k6eTrs43W3qcJaycn", "name" : "randomstring", "startOfCountdown" : { "
  start" : ISODate("2015-04-09T09:53:25.330Z"), "end" : ISODate("2015-04-09T09:53:
  25.330Z"), "units" : 222, "value" : 0, "years" : 0, "months" : 0, "days" : 0, "h
  ours" : 0, "minutes" : 0, "seconds" : 0 } }
  </code></pre>
  
  <p>But in reality its not helping me much.</p>
  
  <p>I can start the countdown like this if want to test it out, and its working fine.</p>
  
  <pre><code>Template.productList.onRendered( function () {
      $('#clock').countdown("2015/04/08", function(event) {
      var totalHours = event.offset.totalDays * 24 + event.offset.hours;
      $(this).html(event.strftime(totalHours + ' hr %M min %S sec'));
      })  
  });
  </code></pre>
  
  <p>So my question is - how do I add this jQuery plugin to my collection and display dynamically for every product I insert to my collection? Do I need to add <code>div id</code> for every entry in my collection also so the plugin would work?</p>
  
  <p>Thanks alot if anybody bothers to read and think.</p>