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

Preface

jQuery 2.0 Development Cookbook will provide you with many reusable code recipes to create common and unique website and web application elements, plugins, and interfaces using the most popular client-side framework, jQuery. Following the step-by-step instructions for each of the recipes will not only provide you with useable code, but also the understanding needed to extend and improve on it.

What this book covers

Chapter 1, Document Object Model Manipulation, covers how to use jQuery to manipulate the 186 web page's HTML code on the client to create a rich and visual user experience.

Chapter 2, Interacting with the User by Making Use of jQuery Events, harnesses the power of jQuery to detect and respond to user interactions, which creates intuitive user interfaces.

Chapter 3, Loading and Manipulating Dynamic Content with AJAX and JSON, utilizes jQuery's AJAX functionality with JSON-formatted data to bring pages to life by updating content without the need for a page refresh.

Chapter 4, Adding Attractive Visuals with jQuery Effects, explains how to add shine to your website or web application with jQuery's effects and basic animations to create unforgettable designs.

Chapter 5, Form Handling, covers how to use jQuery to build robust client-side validation and an intuitive user experience for web forms.

Chapter 6, User Interface, covers how to break the mold and create powerfully intuitive interfaces from scratch and engage the user with a high level of interactivity.

Chapter 7, User Interface Animation, covers how to extend upon jQuery's built-in animation and combine CSS with jQuery to create fabulous website modules for use with any website.

Chapter 8, Understanding Plugin Development, explains how to create reusable code that provides solutions to a range of common website and web application problems.

Chapter 9, jQuery UI, covers how to empower your website or web application with jQuery's user interface library to create attractive and user-friendly page elements and interfaces.

Chapter 10, Working with jQuery Mobile, covers how to create a mobile and cross-platform-ready website using jQuery's powerful mobile framework.

What you need for this book

For all the recipes in this book, you will require an IDE to write JavaScript, HTML, and CSS code, and a web browser to execute your code. For some of the more advanced recipes in this book, you will require a web server running MySQL and PHP.

Who this book is for

This book is for anyone who is either new to jQuery and looking to learn some basics, or familiar with jQuery and looking to expand their knowledge and create some advanced components for their website or web application. This book is an excellent resource for web developers of all skill and experience levels.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Any code within $(function(){ }); will be automatically executed by jQuery when the page is loaded."

A block of code is set as follows:

<!DOCTYPE html>
<html>
<head>
  <title>Creating DOM elements</title>
  <script src="jquery.min.js"></script>
  <script></script>
</head>
<body>
<div id="container">
  <ul id="myList">
    <li>List Item 1</li>
    <li>List Item 2</li>
    <li>List Item 3</li>
  </ul>
</div>
</body>
</html>

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "This will display a pop-up window to the user that has the message Are you sure you want to delete this user?"

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/0896OS_GraphicsBundle.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.