Book Image

Mastering jQuery

By : Alex Libby
Book Image

Mastering jQuery

By: Alex Libby

Overview of this book

<p>Mastering jQuery has been written not only to help maximize your skills with core functionality in the library, but also to explore some of the more intriguing ways of using the library to achieve real-world solutions that could feature on any website or online environment.</p> <p>You'll start with a look at some of the more advanced ways to incorporate the library into your pages, followed by working with forms and advanced form validation using regular expressions. Next you'll move on to animating in jQuery, advanced event handling, and using jQuery effects.</p> <p>Finally, you will develop practical examples of using jQuery with external functionality such as node-webkit, before finishing with a session on optimizing your version of the library for maximum efficiency and exploring best practices for using QUnit.</p>
Table of Contents (21 chapters)
Mastering jQuery
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. Working with Forms

How many times have you bought products online, from outlets such as Amazon? I bet the answer is a fair few times over the years—after all, you can't go into a bookstore late at night, peruse the books, and make a choice, without worrying about the store's closing time or knowing whether you will find a particular book.

Building forms for online sites is arguably one of the key areas where you are likely to use jQuery; the key to its success is ensuring that it validates correctly, as a part of offering a successful user experience.

Throughout this chapter, we're going to go back to the basics a little and delve into some of the techniques that we can use to validate forms, using a mix of HTML and jQuery validation tricks. You'll also see that creating successful forms does not require a lot of complex code, but that the process is equally about ensuring that we have considered the form's functionality requirements at the same time.

Over the next few pages, we...