title: update element using underscore
body: <p>I have used templates using underscore using this tutorial. <a href="http://backbonetutorials.com/what-is-a-view/" rel="nofollow">http://backbonetutorials.com/what-is-a-view/</a>  </p>
  
  <p>I have a situation where I just want to add some text in a p tag to a div structure. 
  This is not a template just some text that needs to have some values injected into it.
  Is there a way to use underscore to just updated the variables in this text. Or would I need to create the text as a template and then add the template using html(_template)  </p>
  
  <pre><code>&lt;div id="popup"&gt;
  &lt;p&gt;I want to add some text in here &lt;%=variable1%&gt;, Then add another variable text in here &lt;%=variable2%&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>I tried doing it based off the template docs using this code.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
     &lt;script type="text/javascript" src="js/jquery.min.js"&gt;&lt;/script&gt;
     &lt;script type="text/javascript" src="js/underscore.js"&gt;&lt;/script&gt;
     &lt;script type="text/javascript" src="js/core.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="popup"&gt;
      &lt;div id="template_holder"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
  &lt;!-- TEMPLATES FOR CANCEL PAYMENT MODEL --&gt;
  &lt;script type="text/template" id="card-success_tmp"&gt;
      &lt;p&gt;I want to add some text in here &lt;%=variable1%&gt;, Then add another variable text in here &lt;%=variable2%&gt;&lt;/p&gt;
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Then in my core js file I have this code below inside a click event that launches my popup</p>
  
  <pre><code>var variables = {variable1:'[xxxx]', variable2:'[MM/YY]'};
  var template = _.template( $("#card-success_tmp").html(), variables );
  $('#popup #template_holder').html(template);
  </code></pre>
  
  <p>But the above is still not working.</p>
  
  <p>I have even tried </p>
  
  <pre><code>var template = _.template( $("#card-success_tmp").html() );
  $('#popup #template_holder').html(template({variable1:'[xxxx]', variable2:'[MM/YY]'}));
  </code></pre>
  
  <p>It renders the text but the passed in variables do not get rendered.</p>
  
  <p>If I added the template as a string and not from the script tag then it will work.
  The question is why is it not working from the script tag. It renders the text but not the variables passed into it.</p>
  
  <pre><code>var template = _.template( "&lt;p&gt;I want to add some text in here &lt;%=variable1%&gt;, Then add another variable text in here &lt;%=variable2%&gt;&lt;/p&gt;" );
  $('#popup #template_holder').html(template({variable1:'[xxxx]', variable2:'[MM/YY]'}));
  </code></pre>