Book Image

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

Book Image

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

Overview of this book

Table of Contents (18 chapters)
Learning jQuery
Credits
About the Authors
About the Reviewers
Preface

Chapter 4. Effects—How to Add Flair to Your Actions

 

Move it up and down now

Move it all around now

 
 -- Devo, “Gut Feeling”

If actions speak louder than words, then in the JavaScript world, effects make actions speak louder still. With jQuery, we can easily add impact to our actions through a set of simple visual effects, and even craft our own, more sophisticated animations.

jQuery effects certainly add flair, as is evident when we see an element gradually slide into view instead of appearing all at once. However, they can also provide important usability enhancements that help orient the user when there is some change on a page (especially common in AJAX applications). In this chapter, we will explore a number of these effects and combine them in interesting ways.

Inline CSS Modification

Before we jump into the nifty jQuery effects, a quick look at CSS is in order. In previous chapters we have been modifying a document’s appearance by defining styles for classes in a separate stylesheet...