https://github.com/firedev/jquery.keynav
jQuery Keyboard Navigation plugin – This plugin allows you to navigate a set of links layed out in a matrix from keyboard
https://github.com/firedev/jquery.keynav
Last synced: about 1 year ago
JSON representation
jQuery Keyboard Navigation plugin – This plugin allows you to navigate a set of links layed out in a matrix from keyboard
- Host: GitHub
- URL: https://github.com/firedev/jquery.keynav
- Owner: firedev
- Created: 2013-04-04T03:21:56.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-21T14:24:28.000Z (almost 13 years ago)
- Last Synced: 2023-03-23T12:50:00.716Z (over 3 years ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 24
- Watchers: 0
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
jQuery Keyboard Navigation plugin
=================================
[**View Demo**](http://firedev.com/jquery.keynav/)
This plugin allows you to navigate a set of links layed out in a matrix from keyboard:
[_ITEM_] [ item ] [ item ] [ item ]
[ item ] [ item ] [ item ] [ item ]
[ item ] [ item ]
The rows should have the same vertical offset. You can mark one element with `.selected` class, or the first one will be selected.
Enter key replaces `window.location.href` with the current `href` value.
Usage:
------
$('#navigation a').keynav();
This will enable keyboard navigation for the links in `#navigation` container. If you need to have some control on the state of plugin you can pass the additional function as a single parameter:
$('#navigation a').keynav(function(){
return window.keyNavigationDisabled;
});
Note: If the function passed returns `true` - keyboard navigation stops.