Creating tabbed content

Similar to an accordion, tabbed content is another great way to display a lot of information on a single page, allowing users to skip through to the sections that are important to them. Like in the previous recipe, there are many jQuery plugins that provide this functionality. This recipe shows you how to create this functionality on your own from scratch, providing you with a deeper understanding of the inner workings of these types of user interfaces.

Getting ready

Create the usual files required for a recipe, recipe-9.html, recipe-9.css, and recipe-9.js, in the same directory as the jQuery library.

How to do it…

Complete all of the following step-by-step instructions:

  1. Create a basic web page in recipe-9.html using the following ...

Get jQuery 2.0 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.