Simple utility for selecting the next / previous ':tabbable' element.
Switch branches/tags
Nothing to show
Clone or download
Mark Lagendijk
Mark Lagendijk Merge pull request #6 from KhodeN/patch-1
fix focusable, stricter checking for nodeName
Latest commit c4d8498 May 25, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Added minification Jan 11, 2014
LICENSE Added minification Jan 11, 2014
README.md Update README.md Feb 23, 2015
bower.json Publish to npm Feb 23, 2015
example.html Added bower.json Jan 9, 2014
gulpfile.js Added minification Jan 11, 2014
jquery.tabbable.js fix focusable, stricter checking for nodeName May 25, 2015
jquery.tabbable.min.js Added minification Jan 11, 2014
package.json Publish to npm Feb 23, 2015

README.md

jQuery.tabbable

Simple utility for selecting the next / previous 'tabbable' element. Includes and uses the ':tabbable' and ':focusable' selectors from jQuery UI Core.

Demo

View the jsFiddle demo.

Methods

jQuery.tabbable adds the following methods.

// Focuses the next ':tabable' element.
jQuery.tabNext();

// Focuses the previous ':tabable' element.
jQuery.tabPrev();

// Focuses the previous ':focusable' element. 
// Elements which have a tabindex of '-1' are 'focusable', but not 'tabbable'.
jQuery.focusNext();

// Focuses the previous ':focusable' element.
// Elements which have a tabindex of '-1' are 'focusable', but not 'tabbable'.
jQuery.focusPrev();

Selectors

jQuery.tabbable adds following selectors (which come from jQuery UI Core):

// Select tabbable elements
$(':tabbable');

// Select focusable elements
$(':focusable');

Installation

  1. bower install jquery.tabbable --save or npm install jquery.tabbable --save
  2. Include jquery.tabbable.min.js