made with esnextbin
Last active
February 4, 2016 20:41
-
-
Save ryaninvents/f724d5e2af6598148f59 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>ESNextbin Sketch</title> | |
| <style> | |
| body { | |
| text-align: center; | |
| padding: 4em; | |
| -webkit-touch-callout: none; /* iOS Safari */ | |
| -webkit-user-select: none; /* Chrome/Safari/Opera */ | |
| -khtml-user-select: none; /* Konqueror */ | |
| -moz-user-select: none; /* Firefox */ | |
| -ms-user-select: none; /* IE/Edge */ | |
| user-select: none; /* non-prefixed version, currently | |
| not supported by any browser */ | |
| } | |
| .touchme { | |
| width: 5em; | |
| border-style: solid; | |
| border-width: 2px; | |
| border-radius: 5px; | |
| text-align: center; | |
| padding-top: 2em; | |
| padding-bottom: 2em; | |
| font-family: sans-serif; | |
| margin: 0.2em; | |
| display: inline-block; | |
| cursor: pointer; | |
| } | |
| .touchme:hover { | |
| opacity: 0.7; | |
| } | |
| #down { | |
| color: firebrick; | |
| border-color: firebrick; | |
| } | |
| #up { | |
| color: steelblue; | |
| border-color: steelblue; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="down" class="touchme">down</div> | |
| <div id="up" class="touchme">up</div> | |
| <p>Click "down", drag to "up" and release. Or, click "down" and then click "up".</p> | |
| <p>Test of <a href="http://www.lukew.com/ff/entry.asp?1932">fluid actions</a>.</p> | |
| <script src="transpiled.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // write ES2015 code and import modules from npm | |
| // and then press "Execute" to run your program | |
| import $ from 'jquery'; | |
| $(() => { | |
| $('#down').mousedown(() => { | |
| $('#up').text('up'); | |
| $('#down').text('ok'); | |
| }); | |
| $('#up').mouseup(() => { | |
| $('#down').text('down'); | |
| $('#up').text('ok'); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "esnextbin-sketch", | |
| "version": "0.0.0", | |
| "dependencies": { | |
| "jquery": "2.2.0" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var _jquery = require('jquery'); | |
| var _jquery2 = _interopRequireDefault(_jquery); | |
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
| (0, _jquery2.default)(function () { | |
| (0, _jquery2.default)('#down').mousedown(function () { | |
| (0, _jquery2.default)('#up').text('up'); | |
| (0, _jquery2.default)('#down').text('ok'); | |
| }); | |
| (0, _jquery2.default)('#up').mouseup(function () { | |
| (0, _jquery2.default)('#down').text('down'); | |
| (0, _jquery2.default)('#up').text('ok'); | |
| }); | |
| }); // write ES2015 code and import modules from npm | |
| // and then press "Execute" to run your program |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment