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

Time for action—using pseudo-classes to zebra stripe a table


Let's set up the markup for our HTML table. It'll have three columns and six rows listing my favorite movies in order.

Pseudo-class example HTML table markup:

<body>
<table width="100%" cellpadding="1" cellspacing="0">
<!-- column headings -->
<tr>
<th>Rank</th>
<th>Movie</th>
<th>Genre</th>
</tr>
<tr>
<td>1</td>
<td>The Matrix</td>
<td>Action</td>
</tr>
<tr>
<td>2</td>
<td>Die Hard</td>
<td>Action</td>
</tr>
<tr>
<td>3</td>
<td>The Dark Knight</td>
<td>Action</td>
</tr>
<tr>
<td>4</td>
<td>Friday</td>
<td>Comedy</td>
</tr>
<tr>
<td>5</td>
<td>Love Actually</td>
<td>Drama</td>
</tr>
</table>
</body>

Our HTML table should...