Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Learning  jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques
Learning  jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques

Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques: Better Interaction Design and Web Development with Simple JavaScript Techniques

$9.99 $29.99
eBook Jul 2007 380 pages Edition
eBook
$9.99 $29.99
Subscription
Free Trial
Renews at $19.99p/m
$9.99 $29.99
eBook Jul 2007 380 pages Edition
eBook
$9.99 $29.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $29.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques

Chapter 1. Getting Started

 

Up on the buzzer

Quick on the start

Let’s go! Let’s go! Let’s go!

 
 -- Devo, “Let’s Go”

Today’s World Wide Web is a dynamic environment, and its users set a high bar for both style and function of sites. To build interesting, interactive sites, developers are turning to JavaScript libraries such as jQuery to automate common tasks and simplify complicated ones. One reason the jQuery library is a popular choice is its ability to assist in a wide range of tasks.

Because jQuery does perform so many different functions, it can seem challenging to know where to begin. Yet, there is a coherence and symmetry to the design of the library; most of its concepts are borrowed from the structure of HTML and Cascading Style Sheets (CSS). Because many web developers have more experience with these technologies than with JavaScript, the library’s design lends itself to a quick start for designers with little programming experience. In fact, in this opening chapter we’ll write a functioning jQuery program in just three lines of code. On the other hand, experienced programmers will also be aided by this conceptual consistency, as we’ll see in the later, more advanced chapters.

But before we illustrate the operation of the library with an example, we should discuss why we might need it in the first place.

What jQuery Does

The jQuery library provides a general-purpose abstraction layer for common web scripting, and is therefore useful in almost every scripting situation. Its extensible nature means that we could never cover all possible uses and functions in a single book, as plug-ins are constantly being developed to add new abilities. The core features, though, address the following needs:

  • Access parts of a page.Without a JavaScript library, many lines of code must be written to traverse the Document Object Model (DOM) tree, and locate specific portions of an HTML document’s structure. jQuery offers a robust and efficient selector mechanism for retrieving exactly the piece of the document that is to be inspected or manipulated.

  • Modify the appearance of a page.CSS offers a powerful method of influencing the way a document is rendered; but it falls short when web browsers do not all support the same standards. jQuery can bridge this gap, providing the same standards support across all browsers. In addition, jQuery can change the classes or individual style properties applied to a portion of the document even after the page has been rendered.

  • Alter the content of a page.Not limited to mere cosmetic changes, jQuery can modify the content of a document itself with a few keystrokes. Text can be changed, images can be inserted or swapped, lists can be reordered, or the entire structure of the HTML can be rewritten and extended—all with a single easy-to-use API.

  • Respond to a user’s interaction with a page.Even the most elaborate and powerful behaviors are not useful if we can’t control when they take place. The jQuery library offers an elegant way to intercept a wide variety of events, such as a user clicking on a link, without the need to clutter the HTML code itself with event handlers. At the same time, its event-handling API removes browser inconsistencies that often plague web developers.

  • Add animation to a page.To effectively implement such interactive behaviors, a designer must also provide visual feedback to the user. The jQuery library facilitates this by providing an array of effects such as fades and wipes, as well as a toolkit for crafting new ones.

  • Retrieve information from a server without refreshing a page.This code pattern has become known as Asynchronous JavaScript and XML (AJAX), and assists web developers in crafting a responsive, feature-rich site. The jQuery library removes the browser-specific complexity from this process, allowing developers to focus on the server-end functionality.

  • Simplify common JavaScript tasks.In addition to all of the document-specific features of jQuery, the library provides enhancements to basic JavaScript constructs such as iteration and array manipulation.

What jQuery Does


The jQuery library provides a general-purpose abstraction layer for common web scripting, and is therefore useful in almost every scripting situation. Its extensible nature means that we could never cover all possible uses and functions in a single book, as plug-ins are constantly being developed to add new abilities. The core features, though, address the following needs:

  • Access parts of a page.Without a JavaScript library, many lines of code must be written to traverse the Document Object Model (DOM) tree, and locate specific portions of an HTML document’s structure. jQuery offers a robust and efficient selector mechanism for retrieving exactly the piece of the document that is to be inspected or manipulated.

  • Modify the appearance of a page.CSS offers a powerful method of influencing the way a document is rendered; but it falls short when web browsers do not all support the same standards. jQuery can bridge this gap, providing the same standards support across all browsers. In addition, jQuery can change the classes or individual style properties applied to a portion of the document even after the page has been rendered.

  • Alter the content of a page.Not limited to mere cosmetic changes, jQuery can modify the content of a document itself with a few keystrokes. Text can be changed, images can be inserted or swapped, lists can be reordered, or the entire structure of the HTML can be rewritten and extended—all with a single easy-to-use API.

  • Respond to a user’s interaction with a page.Even the most elaborate and powerful behaviors are not useful if we can’t control when they take place. The jQuery library offers an elegant way to intercept a wide variety of events, such as a user clicking on a link, without the need to clutter the HTML code itself with event handlers. At the same time, its event-handling API removes browser inconsistencies that often plague web developers.

  • Add animation to a page.To effectively implement such interactive behaviors, a designer must also provide visual feedback to the user. The jQuery library facilitates this by providing an array of effects such as fades and wipes, as well as a toolkit for crafting new ones.

  • Retrieve information from a server without refreshing a page.This code pattern has become known as Asynchronous JavaScript and XML (AJAX), and assists web developers in crafting a responsive, feature-rich site. The jQuery library removes the browser-specific complexity from this process, allowing developers to focus on the server-end functionality.

  • Simplify common JavaScript tasks.In addition to all of the document-specific features of jQuery, the library provides enhancements to basic JavaScript constructs such as iteration and array manipulation.

Why jQuery Works Well


With the recent resurgence of interest in dynamic HTML comes a proliferation of JavaScript frameworks. Some are specialized, focusing on just one or two of the above tasks. Others attempt to catalog every possible behavior and animation, and serve these all up pre-packaged. To maintain the wide range of features outlined above while remaining compact, jQuery employs several strategies:

  • Leverage knowledge of CSS.By basing the mechanism for locating page elements on CSS selectors, jQuery inherits a terse yet legible way of expressing a document’s structure. Because a prerequisite for doing professional web development is knowledge of CSS syntax, jQuery becomes an entry point for designers who want to add behavior to their pages.

  • Support extensions.In order to avoid feature creep, jQuery relegates special-case uses to plug-ins. The method for creating new plug-ins is simple and well-documented, which has spurred the development of a wide variety of inventive and useful modules. Even most of the features in the basic jQuery download are internally realized through the plug-in architecture, and can be removed if desired, yielding an even smaller library.

  • Abstract away browser quirks.An unfortunate reality of web development is that each browser has its own set of deviations from published standards. A significant portion of any web application can be relegated to handling features differently on each platform. While the ever-evolving browser landscape makes a perfectly browser-neutral code base impossible for some advanced features, jQuery adds an abstraction layer that normalizes the common tasks, reducing the size of code, and tremendously simplifying it.

  • Always work with sets.When we instruct jQuery, Find all elements with the class ‘collapsible’ and hide them, there is no need to loop through each returned element. Instead, methods such as .hide() are designed to automatically work on sets of objects instead of individual ones. This technique, called implicit iteration, means that many looping constructs become unnecessary, shortening code considerably.

  • Allow multiple actions in one line.To avoid overuse of temporary variables or wasteful repetition, jQuery employs a programming pattern called chaining for the majority of its methods. This means that the result of most operations on an object is the object itself, ready for the next action to be applied to it.

These strategies have kept the jQuery package slim—roughly 20KB compressed—while at the same time providing techniques for keeping our custom code that uses the library compact, as well.

The elegance of the library comes about partly by design, and partly due to the evolutionary process spurred by the vibrant community that has sprung up around the project. Users of jQuery gather to discuss not only the development of plug-ins, but also enhancements to the core library. Appendix A details many of the community resources available to jQuery developers.

Despite all of the efforts required to engineer such a flexible and robust system, the end product is free for all to use. This open-source project is dually licensed under the GNU Public License (appropriate for inclusion in many other open-source projects) and the MIT License (to facilitate use of jQuery within proprietary software).

Our First jQuery Document


Now that we have covered the range of features available to us with jQuery, we can examine how to put the library into action.

Downloading jQuery

The official jQuery website (http://jquery.com/) is always the most up-to-date resource for code and news related to the library. To get started, we need a copy of jQuery, which can be downloaded right from the home page of the site. Several versions of jQuery may be available at any given moment; the most appropriate for us will be the latest uncompressed version of the library.

No installation is required. To use jQuery, we just need to place it on our site in a public location. Since JavaScript is an interpreted language, there is no compilation or build phase to worry about. Whenever we need a page to have jQuery available, we will simply refer to the file’s location from the HTML document.

Setting Up the HTML Document

There are three pieces to most examples of jQuery usage: the HTML document itself, CSS files to style it, and JavaScript files to act on it. For our first example, we’ll use a page with a book excerpt that has a number of classes applied to portions of it.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html;
                                                   charset=utf-8"/>
    <title>Through the Looking-Glass</title>
    <link rel="stylesheet" href="alice.css" type="text/css"
                                                  media="screen" />
    <script src="jquery.js" type="text/javascript"></script>
    <script src="alice.js" type="text/javascript"></script>
  </head>
  <body>
    <div id="container">
      <h1>Through the Looking-Glass</h1>
      <div class="author">by Lewis Carroll</div>
      <div class="chapter" id="chapter-1">
        <h2 class="chapter-title">1. Looking-Glass House</h2>
        <p>There was a book lying near Alice on the table, and while
           she sat watching the White King (for she was still a
           little anxious about him, and had the ink all ready to
           throw over him, in case he fainted again), she turned over
           the leaves, to find some part that she could read, <span
           class="spoken">"—for it's all in some language I
           don't know,"</span> she said to herself.</p>
        <p>It was like this.</p>
        <div class="poem">
          <h3 class="poem-title">YKCOWREBBAJ</h3>
          <div class="poem-stanza">
            <div>sevot yhtils eht dna ,gillirb sawT'</div>
            <div>;ebaw eht ni elbmig dna eryg diD</div>
            <div>,sevogorob eht erew ysmim llA</div>
            <div>.ebargtuo shtar emom eht dnA</div>
          </div>
        </div>
        <p>She puzzled over this for some time, but at last a bright
        thought struck her. <span class="spoken">"Why, it's a
        Looking-glass book, of course! And if I hold it up to a
        glass, the words will all go the right way again."</span></p>
        <p>This was the poem that Alice read.</p>
        <div class="poem">
          <h3 class="poem-title">JABBERWOCKY</h3>
          <div class="poem-stanza">
            <div>'Twas brillig, and the slithy toves</div>
            <div>Did gyre and gimble in the wabe;</div>
            <div>All mimsy were the borogoves,</div>
            <div>And the mome raths outgrabe.</div>
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

Note

The actual layout of files on the server does not matter. References from one file to another just need to be adjusted to match the organization we choose. In most examples in this book, we will use relative paths to reference files (../images/foo.png) rather than absolute paths (/images/foo.png). This will allow the code to run locally without the need for a web server.

Immediately following the normal HTML preamble, the stylesheet is loaded. For this example, we’ll use a spartan one.

body {
  font: 62.5% Arial, Verdana, sans-serif;
}
h1 {
  font-size: 2.5em;
  margin-bottom: 0;
}
h2 {
  font-size: 1.3em;
  margin-bottom: .5em;
}
h3 {
  font-size: 1.1em;
  margin-bottom: 0;
}
.poem {
  margin: 0 2em;
}
.emphasized {
  font-style: italic;
  border: 1px solid #888;
  padding: 0.5em;
}

After the stylesheet is referenced, the JavaScript files are included. It is important that the script tag for the jQuery library be placed before the tag for our custom scripts; otherwise, the jQuery framework will not be available when our code attempts to reference it.

Note

Throughout the rest of this book, only the relevant portions of HTML and CSS files will be printed. The files in their entirety are available from the book’s companion website http://book.learningjquery.com or from the publisher’s website http://www.packtpub.com/support.

Now we have a page that looks like this:

We will use jQuery to apply a new style to the poem text.

Note

This example is contrived, just to show a simple use of jQuery. In real-world situations, styling such as this could be performed purely with CSS.

Writing the jQuery Code

Our custom code will go in the second, currently empty, JavaScript file, which we included from the HTML using <script src="alice.js" type="text/javascript"></script>. For this example, we only need three lines of code:

$(document).ready(function() {
  $('.poem-stanza').addClass('emphasized');
});

Finding the Poem Text

The fundamental operation in jQuery is selecting a part of the document. This is done with the $() construct. Typically, it takes a string as a parameter, which can contain any CSS selector expression. In this case, we wish to find all parts of the document that have the poem-stanza class applied to them; so the selector is very simple, but we will cover much more sophisticated options through the course of the book. We will step through the different ways of locating parts of a document in Chapter 2.

The $() function is actually a factory for the jQuery object, which is the basic building block we will be working with from now on. The jQuery object encapsulates zero or more DOM elements, and allows us to interact with them in many different ways. In this case, we wish to modify the appearance of these parts of the page, and we will accomplish this by changing the classes applied to the poem text.

Injecting the New Class

The .addClass() method is fairly self-explanatory; it applies a CSS class to the part of the page that we have selected. Its only parameter is the name of the class to add. This method, and its counterpart, .removeClass(), will allow us to easily observe jQuery in action as we explore the different selector expressions available to us. For now, our example simply adds the emphasized class, which our stylesheet has defined as italicized text with a border.

Note that no iteration is necessary to add the class to all the poem stanzas. As we discussed, jQuery uses implicit iteration within methods such as .addClass(), so a single function call is all it takes to alter all of the selected parts of the document.

Executing the Code

Taken together, $() and .addClass() are enough for us to accomplish our goal of changing the appearance of the poem text. However, if this line of code is inserted alone in the document header, it will have no effect. JavaScript code is generally run as soon as it is encountered in the browser, and at the time the header is being processed, no HTML is yet present to style. We need to delay the execution of the code until after the DOM is available for our use.

The traditional mechanism for controlling when JavaScript code is run is to call the code from within event handlers. Many handlers are available for user-initiated events, such as mouse clicks and key presses. If we did not have jQuery available for our use, we would need to rely on the onload handler, which fires after the page (along with all of its images) has been rendered. To trigger our code from the onload event, we would place the code inside a function:

function emphasizePoemStanzas() {
  $('.poem-stanza').addClass('emphasized');
}

Then we would attach the function to the event by modifying the HTML <body> tag to reference it:

<body onload="emphasizePoemStanzas();">

This causes our code to run after the page is completely loaded.

There are drawbacks to this approach, though. We altered the HTML itself to effect this behavior change. This tight coupling of structure and function clutters the code, possibly requiring the same function calls to be repeated over many different pages, or in the case of other events such as mouse clicks, over every instance of an element on a page. Adding new behaviors would then require alterations in two different places, increasing the opportunity for error and complicating parallel workflows for designers and programmers.

To avoid this pitfall, jQuery allows us to schedule function calls for firing once the DOM is loaded—without waiting for images—with the $(document).ready() construct. With our function defined as above, we can write:

$(document).ready(emphasizePoemStanzas);

This technique does not require any HTML modifications. Instead, the behavior is attached entirely from within the JavaScript file. We will learn how to respond to other types of user actions, divorcing their effects from the HTML structure as well, in Chapter 3.

This incarnation is still slightly wasteful, though, because the function emphasizePoemStanzas() is defined only to be used immediately, and exactly once. This means that we have used an identifier in the global namespace of functions that we have to remember not to use again, and for little gain. JavaScript, like some other programming languages, has a way around this inefficiency called anonymous functions (sometimes also called lambda functions). We arrive back at the code as originally presented:

$(document).ready(function() {
  $('.poem-stanza').addClass('emphasized');
});

By using the function keyword without a function name, we define a function exactly where it is needed, and not before. This removes clutter and brings us back down to three lines of JavaScript. This idiom is extremely convenient in jQuery code, as many methods take a function as an argument and such functions are rarely reusable.

When this syntax is used to define an anonymous function within the body of another function, a closure can be created. This is an advanced and powerful concept, but should be understood when making extensive use of nested function definitions as it can have unintended consequences and ramifications on memory use. This topic is discussed fully in Appendix C.

The Finished Product

Now that our JavaScript is in place, the page looks like this:

The poem stanzas are now italicized and enclosed in boxes, due to the insertion of the emphasized class by the JavaScript code.

Summary


We now have an idea of why a developer would choose to use a JavaScript framework rather than writing all code from scratch, even for the most basic tasks. We also have seen some of the ways in which jQuery excels as a framework, and why we might choose it over other options. We also know in general which tasks jQuery makes easier.

In this chapter, we have learned how to make jQuery available to JavaScript code on our web page, use the $() factory function to locate a part of the page that has a given class, call .addClass() to apply additional styling to this part of the page, and invoke $(document).ready() to cause this code to execute upon the loading of the page.

The simple example we have been using demonstrates how jQuery works, but is not very useful in real-world situations. In the next chapter, we will expand on the code hereby exploring jQuery’s sophisticated selector language, finding practical uses for this technique.

Left arrow icon Right arrow icon

What you will learn

  • Use selectors to get anything you want from a page Make things happen on your page with events Add flair to your actions with animation effects Change your page on command with DOM manipulation Use AJAX to make your site buzzword compliant! Transform drab, static information containers into beautiful, dynamic tables Breathe new life into online forms Create dynamic shufflers, rotators, and galleries Get started with three official jQuery plug-ins, and even write your own

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 07, 2007
Length: 380 pages
Edition :
Language : English
ISBN-13 : 9781847192516
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 07, 2007
Length: 380 pages
Edition :
Language : English
ISBN-13 : 9781847192516
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 151.97
HTML5 Data and Services Cookbook
$60.99
Learning  jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques
$43.99
Building Websites with the ASP.NET Community Starter Kit
$46.99
Total $ 151.97 Stars icon
Banner background image

Table of Contents

10 Chapters
Getting Started Chevron down icon Chevron up icon
Selectors—How to Get Anything You Want Chevron down icon Chevron up icon
Events—How to Pull the Trigger Chevron down icon Chevron up icon
Effects—How to Add Flair to Your Actions Chevron down icon Chevron up icon
DOM Manipulation—How to Change Your Page on Command Chevron down icon Chevron up icon
AJAX—How to Make Your Site Buzzword-Compliant Chevron down icon Chevron up icon
Table Manipulation Chevron down icon Chevron up icon
Forms with Function Chevron down icon Chevron up icon
Shufflers and Rotators Chevron down icon Chevron up icon
Plug-ins Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.