npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery-emulatetab

v0.2.9

Published

A jQuery plugin to emulate tabbing between elements on a page.

Downloads

302

Readme

EmulateTab javascript library

A jQuery plugin to emulate tabbing between elements on a page.

The tab key is very useful when it comes to navigating webpages. When working with functions that modify or reuse tabbing through elements on a page, the browser's native tabbing logic cannot be called from javascript. This plugin tries to emulate/simulate that browser logic.

Get it

Download the script, and include it in your HTML page after the jQuery script tag.

Link | Note --- | --- emulatetab.joelpurra.js | For development emulatetab.joelpurra.min.js | For production Github | $ git clone --recursive git://github.com/joelpurra/emulatetab.git Make sure to get the submodules too. Bower | $ bower install jquery-emulatetab Component | $ component install joelpurra/emulatetab NPM | $ npm install jquery-emulatetab jQuery Plugin Registry | Packagist |

Demos

Usage

// 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);

Tabbable elements

Elements that can be focused/tabbed include <input>, <select>, <textarea>, <button> and <a href="..."> (the href attribute must exist and the tag must have some contents).

Note that <input type="hidden" />, <a> (without href or empty contents), disabled="disabled" or display: none; elements cannot be focused/tabbed to.

Original purpose

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.

Dependencies

EmulateTab's only runtime dependencies is jQuery.

Browser compatibility

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.

Contribute

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 [email protected]:USERNAME/emulatetab.git where USERNAME is your github username.
  • $ git checkout -b my-own-modification where my-own-modification is 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
  • $ grunt to make sure all tests pass.
  • $ git push
  • Send a pull request on github.com.

Todo

  • jQuery UI has better code for :focusable/:tabbable. Investigate how to implement it.
  • Investigate focusing/tabbing and [contenteditable].
  • 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.

License

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.