mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 13:31:06 +00:00
38 lines
1011 B
HTML
38 lines
1011 B
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>
|
|
var server = sinon.fakeServer.create();
|
|
server.respondWith("GET", "/test", "<li>FOO</li>");
|
|
</script>
|
|
|
|
|
|
<button onclick="server.respond()">Server Respond</button><em>Work Area</em>
|
|
<hr/>
|
|
<div id="work-area" class="hx-history-element">
|
|
<button hx-indicator="#work-area" hx-get="/test">Click Me</button>
|
|
<img src="spinning-circles.svg" class="indicator">
|
|
</div>
|
|
</body>
|
|
</html>
|