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

Implementing some custom animations


Throughout this chapter, we've explored the use of jQuery to animate objects and seen how this can be compared with CSS-based animations; we've also looked at creating some custom-easing patterns that control how the elements are moved on screen.

Enough of the theory, let's get stuck into some practical uses! Over the next few pages, we're going to take a look at some examples of animating elements; we will include some examples for responsive sites, as this is a popular topic, with the rise in the use of mobile devices to access content on the Internet.

Let's make a start, with a look at animating a simple element, in the form of some buttons—watch out for the twist at the end of the demo!

Animating rollover buttons

The humble button must be one of the most important elements on any website; buttons come in all shapes and sizes, and can be created from the standard <button> HTML element, or by the use of an <input> field.

In this demo, we're going...