Skip to content

Instantly share code, notes, and snippets.

@rs77
Created July 26, 2024 22:44
Show Gist options
  • Save rs77/1f10999567afb0d5fdb5652d69e90011 to your computer and use it in GitHub Desktop.
Save rs77/1f10999567afb0d5fdb5652d69e90011 to your computer and use it in GitHub Desktop.
Full minimal example of creating a sortable table in Metro UI
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sortable Table with Metro-UI</title>
<link rel="stylesheet" href="https://cdn.metroui.org.ua/v4/css/metro-all.min.css">
</head>
<body>
<table class="table" data-role="table">
<thead>
<tr>
<th data-sortable="true">Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>B</td>
</tr>
<tr>
<td>A</td>
</tr>
</tbody>
</table>
<script src="https://cdn.metroui.org.ua/current/metro.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment