Book Image

Learning the Yahoo! User Interface library

By : Dan Wellman
Book Image

Learning the Yahoo! User Interface library

By: Dan Wellman

Overview of this book

<p>The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML, and AJAX. The YUI Library also includes several core CSS resources. All components in the YUI Library have been released as open source under a BSD license and are free for all uses.<br /><br />This book covers all released components whether utility, control, core file, or CSS tool.&nbsp; Methods of the YAHOO Global Object are used and discussed throughout the book.<br />The basics of each control will be presented, along with a detailed example showing its use to create complex, fully featured, cross-browser, Web 2.0 user interfaces.<br /><br />Besides giving you a deep understand of the YUI library, this book will expand your knowledge of object-oriented JavaScript programming, as well as strengthen your understanding of the DOM and CSS.<br /><br />You will learn to create a number of powerful JavaScript controls that can be used straight away in your own applications.</p>
Table of Contents (14 chapters)
Learning the Yahoo! User Interface Library
Credits
About the Author
Preface

Chapter 5. Animation and the Browser History Manager

The Animation utility is used to add a variety of effects to your pages that can really bring your web application to life. It's a very easy component of the library to use, but delivers a powerful and robust mechanism by which elements can be made to grow, move, and even change color.

When using web-based applications that are based on DOM-scripted or AJAX-driven dynamic page changes, it is usually impossible to return to a previous page state using the back button of the browser. The Browser History Manager (BHM) utility provided in the YUI is the first step towards a web of online applications where the functionality of the back and forward browser buttons has been restored.

In this chapter we will look at:

  • Enhancing our pages with attractive animations

  • Why the BHM is needed and how it can be implemented

  • The different components of the BHM

  • Recording state changes

  • Retrieving bookmarked state

Introducing the Animation Utility

The Animation utility...