Skip to content

Instantly share code, notes, and snippets.

@w4ilun
Created July 6, 2016 01:45
Show Gist options
  • Select an option

  • Save w4ilun/7c1a2fa7ac549dafcb2b87f21839c470 to your computer and use it in GitHub Desktop.

Select an option

Save w4ilun/7c1a2fa7ac549dafcb2b87f21839c470 to your computer and use it in GitHub Desktop.
dot template
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.socket.io/socket.io-1.2.1.js"></script>
<script>
$(function(){
var socket = io.connect('[[= model.url]]');
$('#slider').on('input change',function(){
socket.emit('changeBlinkInterval',$(this).val());
});
});
</script>
</head>
<body>
<h1>Slide to change blink interval!</h1>
<input id="slider" type="range" min="100" max="1000" value="1000" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment