MooTools 1.2 Beginner's Guide

Learn how to create dynamic, interactive, and responsive cross-browser web applications using this popular JavaScript framework

MooTools 1.2 Beginner's Guide

Jacob Gube, Garrick Cheung

Learn how to create dynamic, interactive, and responsive cross-browser web applications using this popular JavaScript framework
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$39.99
$29.99p/m after trial
RRP $23.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781847194589
Paperback280 pages

Book Description

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

Chapter 1: MooTools and Me
What is MooTools?
Why use MooTools?
Downloading and installing MooTools
Time for action—downloading and installing the MooTools Core
Rolling your own MooTools
Time for action—exploring the MooTools Core Builder
Time for action—exploring the MooTools More Builder
The API concept
MooTools resources
Summary
Chapter 2: Writing JavaScript with MooTools
Writing unobtrusive JavaScript with MooTools
Time for action—rewriting our script unobtrusively
Creating MooTools classes
Time for action—creating an instance of Dog
Time for action—giving our class instance some custom options
Time for action—determining the value of our options
Time for action—extending the ShowDog class with the Dog class
Using MooTools classes
Time for action—create a chain of Fx.Tween methods
Summary
Chapter 3: Selecting DOM Elements
MooTools and CSS selectors
Working with the $() and $$() functions
Time for action—selecting an element with the dollar function
Time for action—selecting elements with the dollars function
Time for action—selecting multiple sets of elements with the dollars function
Selection using pseudo-classes
Time for action—using pseudo-classes to zebra stripe a table
Working with attribute selectors
Time for action—using = attribute selector
Chapter 4: The Core's Useful Utility Functions
What is the Core?
Browser: Getting information about the client
Time for action—determining the client's rendering engine and version
Time for action—using Browser.Platform to customize SuperSoftware's download page
Exploring the Core utility functions
Time for action—the $time() function
Time for action—exploring the $clear() function with periodical()
Time for action—exploring the $each function
Summary
Chapter 5: Working with Events
What are events exactly?
Adding event listeners
Time for action—highlighting focused fields of web forms
Time for action—adding tooltips to the web form
Creating custom events
Time for action—creating a custom event for showing help tips
Removing, cloning, and firing off events
Time for action—removing an event
Time for action—firing off a click event
The MooTools event object
Time for action—preventing the default behavior of a hyperlink
Time for action—preventing event bubbling
Summary
Chapter 6: Bringing Web Pages to Life with Animation
MooTools' Fx class
Animating a CSS property with Fx.Tween
Time for action— creating a hide/show FAQ page
Time for action—toggling the visibility of a div
Time for action— fading an image in and out
Time for action— indicating blank form fields that are required
Animating multiple CSS properties with Fx.Morph
Time for action— enlarging an image
Time for action— experimenting with morph
Other Fx methods
Summary
Chapter 7: Going 2.0 with Ajax
What you'll need
Creating a Request object
Requesting data
Time for action—requesting remote data
Time for action—updating a web page with HTML
Time for action—loading HTML data
Time for action—working with Ajax and JSON
Sending data
Time for action—sending data to PHP
Setting and getting HTTP headers
Time for action—getting the Last-Modified HTTP header
Summary
Chapter 8: Beefing Up MooTools: Using the MooTools More Plugins
Downloading MooTools More plugins
Time for action—downloading the Fx.Accordion plugin
Installing MooTools plugins
Time for action—installing Fx.Accordion
Discovering a handful of MooTools More plugins
Time for action—creating an accordion
Time for action—downloading more Mootools More plugins
Time for action—building a Date calculator tool
Time for action—creating a web form that uses OverText
Time for action—creating a simple drag-and-drop game
Summary
Chapter 9: Creating Your Own Plugin
Why create a plugin?
Designing the plugin
Time for action—creating a design sheet for our plugin
Creating the ImageCaption script
Time for action—writing the ImageCaption script
Converting the script to a flexible plugin
Time for action—creating the ImageCaption plugin
Instantiating the plugin
Time for action—basic instantiation of the ImageCaption plugin
Time for action—creating new instances of the plugin
Time for action—multiple instances of the ImageCaption plugin
Preparing your plugin for the public
Time for action—documenting the ImageCaption plugin
Time for action—creating a basic download page for the ImageCaption plugin
Summary

What You Will Learn

  • Bringing web pages to life using animation
  • Boosting the responsiveness of your web applications using AJAX with MooTools
  • Building a web form dynamically responsive to a multitude of browser events
  • The basics core functions of MooTools and how they work
  • Creating your own versatile plug-ins that can be customized to fit your own personal requirements
  • How to rapidly build a quick and easy web application using the power of MooTools

Authors

Table of Contents

Chapter 1: MooTools and Me
What is MooTools?
Why use MooTools?
Downloading and installing MooTools
Time for action—downloading and installing the MooTools Core
Rolling your own MooTools
Time for action—exploring the MooTools Core Builder
Time for action—exploring the MooTools More Builder
The API concept
MooTools resources
Summary
Chapter 2: Writing JavaScript with MooTools
Writing unobtrusive JavaScript with MooTools
Time for action—rewriting our script unobtrusively
Creating MooTools classes
Time for action—creating an instance of Dog
Time for action—giving our class instance some custom options
Time for action—determining the value of our options
Time for action—extending the ShowDog class with the Dog class
Using MooTools classes
Time for action—create a chain of Fx.Tween methods
Summary
Chapter 3: Selecting DOM Elements
MooTools and CSS selectors
Working with the $() and $$() functions
Time for action—selecting an element with the dollar function
Time for action—selecting elements with the dollars function
Time for action—selecting multiple sets of elements with the dollars function
Selection using pseudo-classes
Time for action—using pseudo-classes to zebra stripe a table
Working with attribute selectors
Time for action—using = attribute selector
Chapter 4: The Core's Useful Utility Functions
What is the Core?
Browser: Getting information about the client
Time for action—determining the client's rendering engine and version
Time for action—using Browser.Platform to customize SuperSoftware's download page
Exploring the Core utility functions
Time for action—the $time() function
Time for action—exploring the $clear() function with periodical()
Time for action—exploring the $each function
Summary
Chapter 5: Working with Events
What are events exactly?
Adding event listeners
Time for action—highlighting focused fields of web forms
Time for action—adding tooltips to the web form
Creating custom events
Time for action—creating a custom event for showing help tips
Removing, cloning, and firing off events
Time for action—removing an event
Time for action—firing off a click event
The MooTools event object
Time for action—preventing the default behavior of a hyperlink
Time for action—preventing event bubbling
Summary
Chapter 6: Bringing Web Pages to Life with Animation
MooTools' Fx class
Animating a CSS property with Fx.Tween
Time for action— creating a hide/show FAQ page
Time for action—toggling the visibility of a div
Time for action— fading an image in and out
Time for action— indicating blank form fields that are required
Animating multiple CSS properties with Fx.Morph
Time for action— enlarging an image
Time for action— experimenting with morph
Other Fx methods
Summary
Chapter 7: Going 2.0 with Ajax
What you'll need
Creating a Request object
Requesting data
Time for action—requesting remote data
Time for action—updating a web page with HTML
Time for action—loading HTML data
Time for action—working with Ajax and JSON
Sending data
Time for action—sending data to PHP
Setting and getting HTTP headers
Time for action—getting the Last-Modified HTTP header
Summary
Chapter 8: Beefing Up MooTools: Using the MooTools More Plugins
Downloading MooTools More plugins
Time for action—downloading the Fx.Accordion plugin
Installing MooTools plugins
Time for action—installing Fx.Accordion
Discovering a handful of MooTools More plugins
Time for action—creating an accordion
Time for action—downloading more Mootools More plugins
Time for action—building a Date calculator tool
Time for action—creating a web form that uses OverText
Time for action—creating a simple drag-and-drop game
Summary
Chapter 9: Creating Your Own Plugin
Why create a plugin?
Designing the plugin
Time for action—creating a design sheet for our plugin
Creating the ImageCaption script
Time for action—writing the ImageCaption script
Converting the script to a flexible plugin
Time for action—creating the ImageCaption plugin
Instantiating the plugin
Time for action—basic instantiation of the ImageCaption plugin
Time for action—creating new instances of the plugin
Time for action—multiple instances of the ImageCaption plugin
Preparing your plugin for the public
Time for action—documenting the ImageCaption plugin
Time for action—creating a basic download page for the ImageCaption plugin
Summary

Book Details

ISBN 139781847194589
Paperback280 pages
Read More

Read More Reviews

Recommended for You

Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
jQuery UI 1.7: The User Interface Library for jQuery  Book Cover
jQuery UI 1.7: The User Interface Library for jQuery
$ 26.99
$ 18.90
jQuery 1.4 Reference Guide Book Cover
jQuery 1.4 Reference Guide
$ 23.99
$ 16.80
Joomla! 2.5 Beginner’s Guide Book Cover
Joomla! 2.5 Beginner’s Guide
$ 29.99
$ 21.00
Drupal 7 Book Cover
Drupal 7
$ 26.99
$ 18.90
Matplotlib for Python Developers Book Cover
Matplotlib for Python Developers
$ 26.99
$ 18.90