Book Image

MooTools 1.2 Beginner's Guide

Book Image

MooTools 1.2 Beginner's Guide

Overview of this book

MooTools is a simple-to-use JavaScript library, ideal for people with basic JavaScript skills who want to elevate their web applications to a superior level. If you're a newcomer to MooTools looking to build dynamic, rich, and user-interactive web site applications this beginner's guide with its easy-to-follow step-by-step instructions is all you need to rapidly get to grips with MooTools.
Table of Contents (14 chapters)
MooTools 1.2 Beginner's Guide
Credits
About the Authors
About the Reviewer
Preface

Selection using pseudo-classes


MooTools' selection awesomeness is further awesome'ized in its ability to utilize pseudo-classes. Pseudo-class selectors are special selectors that allow you to find items from the DOM using properties that can't be easily deduced using ordinary ID, class, tag, or attribute selectors. Psuedo-class selection will allow you to write complex selection strings; ones that would involve a ton of code if you were to write them in native JavaScript syntax.

A pseudo-class, in CSS3 specifications, allows you to select DOM elements that are difficult to select using normal selectors. The pseudo-class concept was introduced as part of CSS3 specifications by the W3C organization (the people in charge of establishing web standards).

Using a pseudo-class is simple, and follows the format:

:pseudo-classname

Or

:(pseudo-classname)

Note

You can read more about the concept of pseudo-classes from the W3C CSS3 Selectors Level 3 Working Draft at

http://www.w3.org/TR/css3-selectors/...