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-tabs

v0.5.3

Published

jQuery plugin that creates the basic interactivity for an ARIA tabs widget.

Downloads

245

Readme

jquery-tabs

jQuery plugin that creates the basic interactivity for an ARIA tabs widget

Plugin expects one of the following two markup structures.

Type A: Without Progressive Enhancement or Semantic Fallback:

<h2>Delivery Options</h2>
<div class="tabs">
    <div class="tabs__items">
        <div class="tabs__item"><span>USPS</span></div>
        <div class="tabs__item"><span>UPS</span></div>
        <div class="tabs__item"><span>FedEx</span></div>
    </div>
    <div class="tabs__content">
        <div class="tabs__panel">
            <h3 class="tabs__title">USPS</h3>
            <p>The <a href="http://en.wikipedia.org/wiki/United_States_Postal_Service">United States Postal Service</a> (originally called the U.S. Post Office Department, when it was completely managed by the U.S. government before 1971) also known as the Post Office, U.S. Mail, or Postal Service, often abbreviated as USPS is an independent agency of the United States federal government responsible for providing postal service in the United States. It is one of the few government agencies explicitly authorized by the United States Constitution.</p>
            <p>The USPS traces its roots to 1775 during the Second Continental Congress, where Benjamin Franklin was appointed the first postmaster general. The cabinet-level Post Office Department was created in 1792 from Franklin's operation and transformed into its current form in 1971 under the Postal Reorganization Act.</p>
        </div>
        <div class="tabs__panel">
            <h3 class="tabs__title">UPS</h3>
            <p><a href="http://en.wikipedia.org/wiki/United_Parcel_Service">United Parcel Service</a> of North America, Inc., typically referred to and branded as UPS (stylized as ups), is one of the largest shipment and logistics companies in the world. The American global package delivery company is headquartered in Sandy Springs, Georgia, which is part of the Greater Atlanta metropolitan area. UPS delivers more than 15 million packages a day to more than 6.1 million customers in more than 220 countries and territories around the world.[4][5][6]. UPS is known for its brown delivery trucks and uniforms, hence the company nickname "Brown". UPS also operates its own airline and air cargo delivery service (IATA: 5X, ICAO: UPS, Call sign: UPS) based in Louisville, Kentucky.</p>
            </div>
        <div class="tabs__panel">
            <h3 class="tabs__title">FedEx</h3>
            <p><a href="http://en.wikipedia.org/wiki/FedEx_Ground">FedEx Ground</a> is a shipping company that is a subsidiary of the FedEx Corporation. It is headquartered in Moon Township, Pennsylvania, a suburb of Pittsburgh. Originally conceived as a lower cost competitor to UPS, Roadway Package System (RPS) was created to take advantage of new barcode, material handling and computer technologies.After beginning service on March 11, 1985, the company grew, expanding service from its initial coverage of the Mid-Atlantic states, so much so that it eventually became the largest subsidiary of its parent company, Akron-based Roadway Services. By 1996, RPS had achieved 100% coverage of the United States and Canada. In addition, Roadway Services had been reformed as a new holding company called Caliber System, Inc.</p>
        </div>
    </div>
</div>

Type B: With Progressive Enhancement & Semantic Fallback:

<h2>Delivery Options</h2>
<div class="tabs">
    <ul class="tabs__items">
        <li class="tabs__item"><a href="#usps">USPS</a></li>
        <li class="tabs__item"><a href="#ups">UPS</a></li>
        <li class="tabs__item"><a href="#fedex">FedEx</a></li>
    </ul>
    <div class="tabs__content">
        <div class="tabs__panel" id="usps" tabindex="-1">
            <h3 class="tabs__title">USPS</h3>
            <p>The <a href="http://en.wikipedia.org/wiki/United_States_Postal_Service">United States Postal Service</a> (originally called the U.S. Post Office Department, when it was completely managed by the U.S. government before 1971) also known as the Post Office, U.S. Mail, or Postal Service, often abbreviated as USPS is an independent agency of the United States federal government responsible for providing postal service in the United States. It is one of the few government agencies explicitly authorized by the United States Constitution.</p>
            <p>The USPS traces its roots to 1775 during the Second Continental Congress, where Benjamin Franklin was appointed the first postmaster general. The cabinet-level Post Office Department was created in 1792 from Franklin's operation and transformed into its current form in 1971 under the Postal Reorganization Act.</p>
        </div>
        <div class="tabs__panel" id="ups" tabindex="-1">
            <h3 class="tabs__title">UPS</h3>
            <p><a href="http://en.wikipedia.org/wiki/United_Parcel_Service">United Parcel Service</a> of North America, Inc., typically referred to and branded as UPS (stylized as ups), is one of the largest shipment and logistics companies in the world. The American global package delivery company is headquartered in Sandy Springs, Georgia, which is part of the Greater Atlanta metropolitan area. UPS delivers more than 15 million packages a day to more than 6.1 million customers in more than 220 countries and territories around the world.[4][5][6]. UPS is known for its brown delivery trucks and uniforms, hence the company nickname "Brown". UPS also operates its own airline and air cargo delivery service (IATA: 5X, ICAO: UPS, Call sign: UPS) based in Louisville, Kentucky.</p>
            </div>
        <div class="tabs__panel" id="fedex" tabindex="-1">
            <h3 class="tabs__title">FedEx</h3>
            <p><a href="http://en.wikipedia.org/wiki/FedEx_Ground">FedEx Ground</a> is a shipping company that is a subsidiary of the FedEx Corporation. It is headquartered in Moon Township, Pennsylvania, a suburb of Pittsburgh. Originally conceived as a lower cost competitor to UPS, Roadway Package System (RPS) was created to take advantage of new barcode, material handling and computer technologies.After beginning service on March 11, 1985, the company grew, expanding service from its initial coverage of the Mid-Atlantic states, so much so that it eventually became the largest subsidiary of its parent company, Akron-based Roadway Services. By 1996, RPS had achieved 100% coverage of the United States and Canada. In addition, Roadway Services had been reformed as a new holding company called Caliber System, Inc.</p>
        </div>
    </div>
</div>

The choice is yours! Then just execute the plugin:

$('.tabs').tabs();

All necessary ARIA attributes will be added, for example Type B:

<div class="tabs tabs--js">
    <div class="tabs__items" role="tablist">
        <div aria-controls="panel1" aria-selected="true" class="tabs__item" role="tab" tabindex="0" id="tab1">
            <span>Tab 1</span>
        </div>
        <div aria-controls="panel2" aria-selected="false" class="tabs__item" role="tab" tabindex="-1" id="tab2">
            <span>Tab 2</span>
        </div>
        <div aria-controls="panel3" aria-selected="false" class="tabs__item" role="tab" tabindex="-1" id="tab3">
            <span>Tab 3</span>
        </div>
    </div>
    <div class="tabs__content">
        <div class="tabs__panel" id="panel1" role="tabpanel" aria-hidden="false" aria-labelledby="tab1">
            <!-- panel1 heading & content -->
        </div>
        <div class="tabs__panel" id="panel2" role="tabpanel" aria-hidden="true" aria-labelledby="tab2">
            <!-- panel2 heading & content -->
        </div>
        <div class="tabs__panel" id="panel3" role="tabpanel" aria-hidden="true" aria-labelledby="tab3">
            <!-- panel3 heading & content -->
        </div>
    </div>
</div>

Or Type B:

<div class="tabs tabs--js">
    <ul class="tabs__items" role="tablist">
        <li aria-controls="panel1" aria-selected="true" class="tabs__item" role="tab" tabindex="0" id="tab1">
            <a role="presentation">Tab 1</a>
        </li>
        <li aria-controls="panel2" aria-selected="false" class="tabs__item" role="tab" tabindex="-1" id="tab2">
            <a role="presentation">Tab 2</a>
        </li>
        <li aria-controls="panel3" aria-selected="false" class="tabs__item" role="tab" tabindex="-1" id="tab3">
            <a role="presentation">Tab 3</a>
        </li>
    </ul>
    <div class="tabs__content">
        <div class="tabs__panel" id="panel1" role="tabpanel" aria-hidden="false" aria-labelledby="tab1">
            <!-- panel3 heading & content -->
        </div>
        <div class="tabs__panel" id="panel2" role="tabpanel" aria-hidden="true" aria-labelledby="tab2">
            <!-- panel3 heading & content -->
        </div>
        <div class="tabs__panel" id="panel3" role="tabpanel" aria-hidden="true" aria-labelledby="tab3">
            <!-- panel3 heading & content -->
        </div>
    </div>
</div>

The tabs are navigable with keyboard & mouse.

You can style the tabs however you wish. Have fun!