title: Javascript template parsing in mobile devices
body: <p>I have implemented basic template parser for javascript. it simply replaces variables within template string. i.e    {event.date}   will be  7/4/2013  </p>
  
  <p>I am using script tag to store template string</p>
  
  <pre><code>&lt;script id="date_template" type="text/html"&gt; &lt;span class="date" id="date_{event.id}"&gt;  {event.date}  &lt;span&gt; &lt;/script&gt; 
  </code></pre>
  
  <p>but it gives error in mobile devices so I have used div element for this</p>
  
  <pre><code>&lt;div style="display:none" id="date_template"&gt; &lt;span class="date" id="date_{event.id}"&gt;  {event.date}  &lt;span&gt; &lt;/div&gt; 
  </code></pre>
  
  <p>but it creates dom element which causes other problems. Is there any other way to do this?</p>