View index.js
This file contains 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
console.log('hello world'); |
View gist:63d4ea907d042c706bd692c7c09e8574
This file contains 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
$.fn.numeral = function() { | |
this.bind("keydown", | |
function(e) { | |
// Allow: backspace, delete, tab, escape and enter | |
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110]) !== -1 || | |
// Allow: Ctrl+A, Command+A | |
(e.keyCode == 65 && (e.ctrlKey === true || e.metaKey === true)) || | |
// Allow: home, end, left, right, down, up | |
(e.keyCode >= 35 && e.keyCode <= 40)) { | |
// let it happen, don't do anything |