Skip to content

Instantly share code, notes, and snippets.

@smcl
Created February 7, 2016 17:51
Show Gist options
  • Save smcl/a3cb464ab5ffcfd25643 to your computer and use it in GitHub Desktop.
Save smcl/a3cb464ab5ffcfd25643 to your computer and use it in GitHub Desktop.
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js">
</script>
<script>
function toggleLED() {
$.post("/", {}, function(response){
location.reload();
});
}
</script>
<body>
<p>
LED is <button onclick="toggleLED()">%s</button>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment