1.0.0 • Published 9 years ago

tabable v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
9 years ago

Tabable

This is a simple module that will add tab-index attributes to your elements. Build Status

Install

$ npm install tabable

Usage

tabable( element[, filter ] )

Given an element, tabable find all the inputs (or whatever you specify via the optional filter argument) within it an give them a tab-index. Eg:

var tabable = require( 'tabable' );

// make all the inputs have a reasonable tab-index
tabable( document.getElementById( 'foo' ) );

Only want textareas to be tabable?

var tabable = require( 'tabable' );

// only set tab-index on the textarea elements
tabable( document.getElementById( 'foo' ), 'textarea' );
Have an issue? report it in the issues tab.