Created
February 1, 2015 00:47
-
-
Save baconator/36d0f839a95aa43e2ad9 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/rovixe
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> | |
| <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
| <script src="http://d3js.org/d3.v3.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <label for="wordInput"><span>Input String</span></label> | |
| <input type="text" name="wordInput"/> | |
| <script id="jsbin-javascript"> | |
| $(document).ready(function(){ | |
| console.log("Started!"); | |
| $("*[name='wordInput']").on("keydown", function(event){ | |
| console.log(event.which.toString() + " " + this.selectionStart.toString()); | |
| }); | |
| }); | |
| </script> | |
| <script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="//code.jquery.com/jquery-2.1.1.min.js"><\/script> | |
| <script src="http://d3js.org/d3.v3.min.js"><\/script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <label for="wordInput"><span>Input String</span></label> | |
| <input type="text" name="wordInput"/> | |
| </body> | |
| </html></script> | |
| <script id="jsbin-source-javascript" type="text/javascript">$(document).ready(function(){ | |
| console.log("Started!"); | |
| $("*[name='wordInput']").on("keydown", function(event){ | |
| console.log(event.which.toString() + " " + this.selectionStart.toString()); | |
| }); | |
| });</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
| $(document).ready(function(){ | |
| console.log("Started!"); | |
| $("*[name='wordInput']").on("keydown", function(event){ | |
| console.log(event.which.toString() + " " + this.selectionStart.toString()); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment