JSFiddle - React, Tailwind, and code Playground

by srinivas yaragalla

HTML

<script>
  (function(a) {
    var r = a.fn.domManip,
      d = "_tmplitem",
      q = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,
      b = {},
      f = {},
      e, p = {
        key: 0,
        data: {}
      },
      h = 0,
      c = 0,
      l = [];

    function g(e, d, g, i) {
      var c = {
        data: i || (d ? d.data : {}),
        _wrap: d ? d._wrap : null,
        tmpl: null,
        parent: d || null,
        nodes: [],
        calls: u,
        nest: w,
        wrap: x,
        html: v,
        update: t
      };
      e && a.extend(c, e, {
        nodes: [],
        parent: d
      });
      if (g) {
        c.tmpl = g;
        c._ctnt = c._ctnt || c.tmpl(a, c);
        c.key = ++h;
        (l.length ? f : b)[h] = c
      }
      return c
    }
    a.each({
      appendTo: "append",
      prependTo: "prepend",
      insertBefore: "before",
      insertAfter: "after",
      replaceAll: "replaceWith"
    }, function(f, d) {
      a.fn[f] = function(n) {
        var g = [],
          i = a(n),
          k, h, m, l, j = this.length === 1 && this[0].parentNode;
        e = b || {};
        if (j && j.nodeType === 11 && j.childNodes.length === 1 && i.length === 1) {
          i[d](this[0]);
          g = this
        } else {
          for (h = 0, m = i.length; h < m; h++) {
            c = h;
            k = (h > 0 ? this.clone(true) : this).get();
            a.fn[d].apply(a(i[h]), k);
            g = g.concat(k)
          }
          c = 0;
          g = this.pushStack(g, f, i.selector)
        }
        l = e;
        e = null;
        a.tmpl.complete(l);
        return g
      }
    });
    a.fn.extend({
      tmpl: function(d, c, b) {
        return a.tmpl(this[0], d, c, b)
      },
      tmplItem: function() {
        return a.tmplItem(this[0])
      },
      template: function(b) {
        return a.template(b, this[0])
      },
      domManip: function(d, l, j) {
        if (d[0] && d[0].nodeType) {
          var f = a.makeArray(arguments),
           ...

JavaScript

$(document).ready(function() {

   var whatIfData = {
     rows: []
   };
   for (i = 0; i < 5; i++) {
     whatIfData.rows.push({
       swiftVariable: 'swiftVariable' + i,
       displayName: 'displayName' + i,
       dataType: 'dataType' + i,
       numberOfInputs: 'numberOfInputs' + i,
       firstYearInputApplies: 'firstYearInputApplies' + i,
       accountingFunding: 'accountingFunding' + i
     })
   }

   $("#clientTemplate").tmpl(whatIfData).appendTo("div");

 });