Book Image

jQuery 2.0 Development Cookbook

By : Leon Revill
Book Image

jQuery 2.0 Development Cookbook

By: Leon Revill

Overview of this book

Table of Contents (17 chapters)
jQuery 2.0 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 HTML code:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Chapter 6 :: Recipe 9</title>
        <link href="recipe-9.css" rel="stylesheet" type="text/css" />
        <script src="jquery.min.js"></script>
        ...