JSFiddle - React, Tailwind, and code Playground

by friek2k

HTML

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.0.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
<table border="0" class="display" id="example"></table>

JavaScript

/*
        Creates the grid after page is ready
    */
    $(document).ready(function () {
        $oTable = $('#example').dataTable({
            "bJQueryUI": false,
                "bProcessing": true,
                "bPaginate": true,
                "bFilter": true,
                "bInfo": true,
                "aaData": [
                ["1", "2", "3 <button name=\"set\">x<\/button>"],
                ["4", "5", "6 <button name=\"set\">y<\/button>"],
                ["7", "8", "9 <button name=\"set\">z<\/button>"],
                ["1", "8", "9 <button name=\"set\">1<\/button>"]
            ],
                "aoColumns": [{
                "bSortable": true,
                    "bVisible": true,
                    "bSearchable": true,
                    "sTitle": "testcol",
                    "sType": "string",
                    "sWidth": null,
                    "sClass": "center",
                    "asSorting": ["asc", "desc"]
            }, {
                "bSortable": true,
                    "bVisible": true,
                    "bSearchable": true,
                    "sTitle": "testcol2",
                    "sType": "string",
                    "sWidth": null,
                    "sClass": "center",
                    "asSorting": ["asc", "desc"]
            }, {
                "bSortable": true,
                    "bVisible": true,
                    "bSearchable": true,
                    "sTitle": "testcol3",
                    "sType": "string",
                    "sWidth": null,
                    "sClass": "center",
                    "asSorting": ["asc", "desc"]
            }]
        });
    });

    $(function () {
        $oTable.fnSettings()._fnDrawCallback = function (oSettings) {
            if (oSettings.aiDisplay.length === 0) {
                return;
            }

            var nTrs = $('#example tbody tr');
            var iColspan = nTrs[0].getElementsByTagName('td').length;
            var sLastGroup =...