@gbosetti/access-keys-activators
Version:
jQuery plugin to retrieve the keys that activate the access key of the HTML elements which have it defined.
21 lines • 797 B
HTML
<html>
<head>
<title>Demo</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script type="text/javascript" src="../Jquery.accessKeysActivators.js"></script>
</head>
<body>
<div>Activation keys go here</div>
<script type="text/javascript">
// Requires https://github.com/bestiejs/platform.js/blob/master/platform.js
// Uses some of the mapping data in https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey
$(function() {
var keys = $.getAccessKeyActivators();
console.log(keys);
$("div").html(keys.toString());
});
</script>
</body>
</html>