JSFiddle - React, Tailwind, and code Playground

by Serhat Uzuncavdar

HTML

<script src="//cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.2/css/jquery.dataTables.min.css">
<div class="add_to_this">
        <p>test</p>
    </div>

JavaScript

jQuery(function ()
    {
        var s="<table id='example'><thead><tr><th>Sites</th></tr></thead><tbody><tr><td>line1</td></tr><tr><td>line2</td></tr><tr><td>line3</td></tr></tbody></table>"
        $('.add_to_this').append(s);
        $('#example').dataTable();
    });