JSFiddle - React, Tailwind, and code Playground
by ruslanchek
HTML
<div id="test"></div>
CSS
.b {
background: black;
color: white;
padding: 10px;
}
JavaScript
var jsSmarty = {
parseT: function(){
var t = this.t,
result = '',
reg;
reg = new RegExp('t');
t = t.replace(reg, '');
return t;
},
init: function(){
this.wrapper_opener = '{';
this.wrapper_closer = '}';
this.o = $('#test');
this.o.html(this.parseT());
}
};
jsSmarty.t = '<div class="b">{$test}</div>';
$(function(){
jsSmarty.init();
});