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
function keySequence(callback) { | |
var i = 0; | |
var konami = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; | |
$(document).keydown(function (event) { | |
if (konami[i] === event.which) { | |
i++; | |
if (konami.length === i) { | |
i = 0; | |
callback(); | |
} |
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
(function (window, document) { | |
var settings = { | |
dataId: 'data-myModule-id', | |
url: '/api/mymodule/' | |
}; | |
function load() { | |
var elems = document.querySelectorAll('[' + settings.dataId + ']'); | |
if (!elems) { |
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
(function ($) { | |
$.fn.formNavigation = function () { | |
$(this).each(function () { | |
$(this).find('input').on('keyup', function(e) { | |
switch (e.which) { | |
case 39: | |
$(this).closest('td').next().find('input').focus(); break; | |
case 37: | |
$(this).closest('td').prev().find('input').focus(); break; | |
case 40: |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="shortcut icon" href="../../docs-assets/ico/favicon.png"> |
NewerOlder