A jQuery plugin to emulate tabbing between elements on a page.
Download the script, and include it in your HTML page after the jQuery script tag.
Make sure to get the submodules too.
|jQuery Plugin Registry|
example/demo.html: Simple demo for comparing EmulateTab to your browser.
// Emulate forward tab from the currently focused element $.emulateTab(); // Emulate reverse tab from the currently focused element $.emulateTab(-1); // Emulate forward tab from a specific element $(selector).emulateTab(); // Emulate reverse tab from a specific element $(selector).emulateTab(-1);
Elements that can be focused/tabbed include
<a href="..."> (the
href attribute must exist and the tag must have some contents).
<input type="hidden" />,
href or empty contents),
display: none; elements cannot be focused/tabbed to.
Developed to as a part of two other plugins; one to use tab to skip over less used form fields, the other to use the + on the keypad as a new tab key. Both plugins were used in a web application for registering and administering letters.
EmulateTab's only runtime dependencies is jQuery.
Should be about as compatible as jQuery is, since most functions depend on jQuery's normalization. You are engouraged to run the EmulateTab test suite and then report any issues.
In order to contribute to the project, follow these steps.
- Make sure you have installed git, npm, bower, grunt, jekyll.
- Fork the project on github.
$ git clone --recursive firstname.lastname@example.org:USERNAME/emulatetab.gitwhere
USERNAMEis your github username.
$ git checkout -b my-own-modificationwhere
my-own-modificationis a descriptive name for your fix or feature.
$ npm install && bower install
$ grunt watch
- Make your changes to the code. Remember to write new test cases for your changes.
$ git commit
$ gruntto make sure all tests pass.
$ git push
- Send a pull request on github.com.
- jQuery UI has better code for
:tabbable. Investigate how to implement it.
- Investigate focusing/tabbing and
- Investigate focusing/tabbing non-input elements with
[tabindex]and negative values value.
- Create a separate git repo for packaged/minified bower/composer/component/jquery plugin releases.
Developed for PTS by Joel Purra http://joelpurra.se/
Copyright (c) 2011, 2012, 2013, 2014, 2015, The Swedish Post and Telecom Authority (PTS) All rights reserved.
Released under the BSD license.