Skip to Main Content
MooTools 1.3 Cookbook
book

MooTools 1.3 Cookbook

by Jay L Johnston
July 2011
Intermediate to advanced content levelIntermediate to advanced
276 pages
5h 11m
English
Packt Publishing
Content preview from MooTools 1.3 Cookbook

Sending a Corvette on a list of errands—extending a class with a chain

To gain some familiarity with how chains work, look in Chapter 7, Knock And the Door Will Open: Events and Listeners for more chaining recipes that do not include the minor complexity of Implements.

Getting ready

Create a canvas where the tasks completed can be written and a trigger to fire each task.

<h1>Taskinator:</h1>
<form action="" method="get">
<input type="button" value="Do Next Task!" id="taskinator"/>
</form>
<h1>Items Done:</h1>
<div id="itemsdone"></div>

How to do it...

  1. Implement the chain
  2. Load the chain with actions
  3. Fire off the actions in the chain

Follow these steps:

  1. Create a class that implements Chain with a method that will append a new action to the class's internal ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Web Performance

Jump Start Web Performance

Craig Buckler

Publisher Resources

ISBN: 9781849515689Other