PacktLib: YUI 2.8: Learning the Library

YUI 2.8 Learning the Library

Credits

About the Authors

About the Reviewers

Preface

Getting Started with YUI

What is the YUI?

What comes with the YUI?

Installing the YUI

Using the library files in your own web pages

Code placement

Perfect date selection with the Calendar Control

Implementing a Calendar

Summary

Creating Consistency with the CSS Tools

Tools of the trade

Element normalization with reset.css

First base

Tidying up text with fonts.css

Layout pages with ease using grids.css

A word on Sam

Summary

DOM Manipulation and Event Handling

Working with the DOM

Common DOM scripting techniques

DOM manipulation in YUI

The Selector Utility

Listening for Events the easy (YUI) way

Event models

YUI event capturing

A look at the Event Utility

Custom events

The Element Utility

Summary

Calling Back Home

Introduction to Connection Manager

The XMLHttpRequest object interface

A closer look at the response object

The Callback object

Basic communication

Yahoo Query Language (YQL)

Summary

Animation, the Browser History Manager, and Cookies

Introducing the Animation Utility

Using Animation to create an Accordion Widget

Restoring the browser's expected functionality

Cookies

Summary

Content Containers and Tabs

Meet the YUI Container family

Creating a Panel

Before we go on

Working with Dialogs

An "Are you sure?" SimpleDialog

Easy Tooltips

The YUI TabView Control

Adding tabs

Summary

Menus

Common navigation structures

Instant menus—just add water (or a Menu Control)

The Menu classes

Creating a basic navigation menu

Using the ContextMenu

The application-style MenuBar

Summary

Buttons and Trees

Why use the YUI Button family?

Meet the Button Control

Using the Button Control

Using the Split Button type

Tree-like structures with the TreeView Control

Planting the seed

Summary

DataSource and AutoComplete

Tabular data sources

Look ahead with the AutoComplete Control

Implementing AutoComplete

Summary

DataTable

DataTable dependencies

DataTable classes

Creating a DataTable

Summary

Rich Text Editor

The two editors

A simple e-mail editor

Summary

Drag-and-Drop with the YUI

Dynamic drag-and-drop without the hassle

DragDrop classes

Implementing drag-and-drop

Visual selection with the slider control

A very simple slider

The Resize utility

The Layout Manager

Summary

Everyday Tools

Lint-free code

The Logger

Debugging

Watching bits go by

Seeking performance

YUI Testing

Summary