0.1.0 • Published 4 years ago

@gbosetti/access-keys-activators v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Browser's Access Key Activators detector (jQuery plugin)

Description

This jQuery plugin retrieves the keys that activate the access-key of the HTML elements which have it defined.

It currently supports Linux, Mac and Windows OS and Chrome, Firefox, Opera and IE. It uses some of the mapping info from https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey

Dependencies

Requires jQuery >=1.5 and https://github.com/bestiejs/platform.js/blob/master/platform.js

Usage

  1. Include jQuery & platform.js:

    <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>
  2. Include plugin's code:

    <script type="text/javascript" src="../Jquery.accessKeysActivators.js"></script>
  3. Call the plugin:

    $(function() {
    	var keys = $.getAccessKeyActivators();
    	console.log(keys);
    	$("div").html(keys.toString());
    });

Updating the plugin

Follow the instructions in https://github.com/jquery-boilerplate/jquery-boilerplate/wiki/How-to-publish-a-plugin-in-jQuery-Plugin-Registry