mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 14:31:47 +00:00
44 lines
1.2 KiB
HTML
44 lines
1.2 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Scratch File</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
|
|
<style>
|
|
.indicator {
|
|
opacity: 0;
|
|
transition: all 200ms ease-in;
|
|
}
|
|
.hx-show-indicator .indicator {
|
|
opacity: 100%;
|
|
}
|
|
body {
|
|
background-color: #6272a4;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script src="../node_modules/sinon/pkg/sinon.js"></script>
|
|
<script src="../src/htmx.js"></script>
|
|
<script src="util.js"></script>
|
|
|
|
<script>
|
|
var server = makeServer();
|
|
server.respondWith("GET", "/test", "get");
|
|
server.respondWith("POST", "/test", "post");
|
|
server.respondWith("PUT", "/test", "put");
|
|
server.respondWith("PATCH", "/test", "patch");
|
|
server.respondWith("DELETE", "/test", "delete");
|
|
server.autoRespond = true;
|
|
</script>
|
|
|
|
|
|
<button onclick="server.respond()">Server Respond</button><em>Work Area</em>
|
|
<hr/>
|
|
<div id="work-area" class="hx-history-element">
|
|
<button id="b1" hx-indicator="#work-area" hx-delete="/test">Click Me</button>
|
|
<img src="spinning-circles.svg" class="indicator">
|
|
</div>
|
|
</body>
|
|
</html>
|