How run

How run

KeshvadiKeshvadi Posts: 4Questions: 2Answers: 0
edited January 2019 in Free community support

Hi, I am new here.
I just want to see the sample table but I could not. there is not any change in the table. I just want to use this in localhost.
Here is my HTML code:

<!doctype html>
<html>
<head>
    <title>Test</title>
<link rel="stylesheet" type="text/css" href="/DataTables/datatables.css">
 
<script type="text/javascript" charset="utf8" src="/DataTables/datatables.js"></script>

    <script>
        $(document).read(function () {
            $('#myTable').DataTable();
        });
    </script>
</head>
<body>
<table id="myTable" class="display">
    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Row 1 Data 1</td>
            <td>Row 1 Data 2</td>
        </tr>
        <tr>
            <td>Row 2 Data 1</td>
            <td>Row 2 Data 2</td>
        </tr>
    </tbody>
</table>

</body>
</html>

Answers

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947

    Line 6 looks to be incorrect. Try changing $(document).read(function () { to $(document).ready(function () {.

    Kevin

  • KeshvadiKeshvadi Posts: 4Questions: 2Answers: 0

    Thanks

This discussion has been closed.