What is stabs.js?

stabs.js is a JavaScript library for wiring up tabbed sections in your web page markup.

The lib is just shy of 3KB in size before minification.

It’s not something I’m proud of. It’s not the friendliest or the most modern approach. There's no fancy prototypal inheritance involved, it just looks for markup classified as a tabcontainer, looks for tabs and tabpanels within, and wires up the click events.

However, it’s easy to use, it conforms to web accessibility guidelines, and it will work in basically any browser made after IE7 without polyfills. If you polyfill querySelector, it may even work in IE7.