title: jquery countdown in dynamically created html
body: <p>i need a little help using the jquery countdown <a href="http://keith-wood.name/countdown.html" rel="nofollow" title="keith wood - jquery countdown plugin">keith wood - jquery countdown plugin</a></p>
  
  <p>I am creating several countdowns by retrieving data from mysql database (php ajax call) and putting it into a div:</p>
  
  <p>in php (getdetails.php -> gets $mid and $time from mysql-database):</p>
  
  <pre><code>    $mrow="TimeCounter inserted here:"
      $mrow.="&lt;div id=\"RowDiv\"&gt;&lt;div id=\"timecount".$mid."\"&gt;&lt;script&gt; $('#timecount".$mid."').countdown({until: ".$time."}); &lt;/script&gt;&lt;/div&gt;&lt;/div&gt;";
      $mrow.="TimeCounter ends here";
  </code></pre>
  
  <p>in JS i set the innerHTML with the data i got:</p>
  
  <pre><code>    var url="getDetails.php";
      var what="getTimeData"; 
         console.log("call getTimeData");
      var p1 = $.post(url,{what:what,selId:selValue,conName:"GId"});
          p1.done(function(data){
          console.log("Data -&gt; : "+ data);
          document.getElementById("CounterDiv").innerHTML=data
        });
  </code></pre>
  
  <p>console.log(data) shows me the set html:</p>
  
  <pre><code>    &lt;div id="RowDiv" &gt;&lt;div id="timecount2"&gt;&lt;script&gt; $('#timecount2').countdown({until: 1454713200}); &lt;/script&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I get no errors but i dont see the counter... I do see the surrounding TimeCounter inserted here: TimeCounter ends here on the page. I suppose it is a client / server side issue. Maybe i need to call the function again after setting the innerHTML with the data. But i dont know how.</p>
  
  <p>How can i solve this? Any ideas?</p>