Skip to content

Instantly share code, notes, and snippets.

@ChaosJohn
Created June 12, 2018 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChaosJohn/ce118c54d01e4ef108ed3475754907ca to your computer and use it in GitHub Desktop.
Save ChaosJohn/ce118c54d01e4ef108ed3475754907ca to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/wekupe
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.9/rx.lite.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
1, 2
<script id="jsbin-javascript">
var moves = Rx.Observable.fromEvent(document, 'mousemove');
moves.throttle(1000).subscribe(function(event) {
document.body.innerHTML = event.x + ', ' + event.y;
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.9/rx.lite.js"><\/script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
1, 2
</body>
</html></script>
<script id="jsbin-source-javascript" type="text/javascript">var moves = Rx.Observable.fromEvent(document, 'mousemove');
moves.throttle(1000).subscribe(function(event) {
document.body.innerHTML = event.x + ', ' + event.y;
});</script></body>
</html>
var moves = Rx.Observable.fromEvent(document, 'mousemove');
moves.throttle(1000).subscribe(function(event) {
document.body.innerHTML = event.x + ', ' + event.y;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment