JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.3/underscore-min.js"></script>
<div id="popup">
<div id="template_holder"></div>
</div>
<!-- TEMPLATES FOR CANCEL PAYMENT MODEL -->
<script type="text/template" id="card-success_tmp">
<p> I want to add some text in here <%= variable1 %> , Then add another variable text in here <%= variable2 %> </p>
</script>
JavaScript
$(function () {
var variables = {
variable1: '[xxxx]',
variable2: '[MM/YY]'
};
var template = _.template( $("#card-success_tmp").html() );
$('#template_holder').html(template({variable1:'[xxxx]', variable2:'[MM/YY]'}));
});