Get started with datatables.net-colreorder-bs5 CDN

MIT licensed

Datatables.net-colreorder-bs5 is a plugin that enables column reordering for DataTables with Bootstrap 5.

Tags:
  • reorder
  • DataTables
  • jQuery
  • table
  • Bootstrap 5

Stable version

Copied!

How to start using datatables.net-colreorder-bs5 CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with datatables.net-colreorder-bs5 CDN - cdnhub.io</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/colreorder/2.0.0/css/colReorder.bootstrap5.min.css">
</head>
<body>
    <div class="container mt-5">
        <table id="example" class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Age</th>
                    <th>City</th>
                </tr>
            </thead>
        </table>
    </div>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/colreorder/2.0.0/js/dataTables.colReorder.min.js"></script>
    <script src="https://cdn.datatables.net/colreorder/2.0.0/js/colReorder.bootstrap5.min.js"></script>

    <script>
        $(document).ready(function() {
            $('#example').DataTable({
                responsive: true,
                language: {
                    url: '//cdn.datatables.net/plug-ins/9d/jszip-2.5.0/jszip.min.js'
                },
                colReorder: {
                    select: true
                }
            });
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions