Book Image

jQuery for Designers Beginner's Guide Second Edition

By : Natalie Maclees
Book Image

jQuery for Designers Beginner's Guide Second Edition

By: Natalie Maclees

Overview of this book

Table of Contents (21 chapters)
jQuery for Designers Beginner's Guide Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating simple tabs


Perform the following steps to turn a list of links into tabs:

  1. We'll get started with our basic HTML file and associated folders, like we created in Chapter 1, Designer, Meet jQuery. Inside the <body> tag, we'll start by setting up a simple example that will work even for users with JavaScript disabled. We'll put a list of anchor links to different areas of the page at the top and then wrap each of our content sections in a div block with an ID, as shown in the following code:

    <header class="content">
      <h1>Noble Gases</h1>
      <p>Odorless, colorless, monatomic gases with very low chemical reactivity</p>
    </header>
    
    <ul id="tabs">
      <li><a href="#he">He</a></li>
      <li><a href="#ne">Ne</a></li>
      <li><a href="#ar">Ar</a></li>
      <li><a href="#kr">Kr</a></li>
      <li><a href="#xe">Xe</a></li>
    ...