Mootools 1.2 Beginners Guide LITE: Getting started
By Jacob Gube and Garrick Cheung
()
About this ebook
Related to Mootools 1.2 Beginners Guide LITE
Related ebooks
MooTools 1.2 Beginner's Guide Rating: 0 out of 5 stars0 ratingsMastering JavaScript: The Complete Guide to JavaScript Mastery Rating: 5 out of 5 stars5/5JavaScript: Best Practice Rating: 0 out of 5 stars0 ratingsMooTools 1.3 Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft AJAX Library Essentials: Client-side ASP.NET AJAX 1.0 Explained Rating: 0 out of 5 stars0 ratingsJavaScript. Rating: 0 out of 5 stars0 ratingsThe Basics of JavaScript Coding For Beginners: Learn Basic JavaScript Programming Concepts Rating: 0 out of 5 stars0 ratingsThe Ultimate Guide to Mastering JavaScript: A Beginner's Journey Rating: 0 out of 5 stars0 ratingsCooking up the web with HTML and JavaScript Rating: 0 out of 5 stars0 ratingsJavaScript Fundamentals Made Easy: A Practical Guide with Examples Rating: 0 out of 5 stars0 ratingsThe Basics of JavaScript and HTML Coding For Beginners: Learn JavaScript and HTML Programming Web Design Skills Together Rating: 0 out of 5 stars0 ratingsJavaScript Made Easy: A Practical Guide with Examples Rating: 0 out of 5 stars0 ratingsJasmine JavaScript Testing - Second Edition Rating: 0 out of 5 stars0 ratingsPython | Learn to Code Step by Step Rating: 0 out of 5 stars0 ratingsJavaScript: Tips and Tricks to Programming Code with Javascript: JavaScript Computer Programming, #2 Rating: 0 out of 5 stars0 ratingsBeginning JavaScript Rating: 0 out of 5 stars0 ratingsJavaScript: Novice to Ninja Rating: 2 out of 5 stars2/5JavaScript for Beginners Rating: 5 out of 5 stars5/5JavaScript & Vue.js: A Match Made in Heaven Rating: 0 out of 5 stars0 ratingsJavascript - 50 functions and tutorial Rating: 4 out of 5 stars4/5Just the basics of JavaScript Rating: 0 out of 5 stars0 ratingsJavaScript OOP Step by Step: A Practical Guide with Examples Rating: 0 out of 5 stars0 ratingsLearning jQuery Rating: 4 out of 5 stars4/5JavaScript Unleashed: Scripting the Web: A Comprehensive Guide to JavaScript Programming Rating: 0 out of 5 stars0 ratingsJavaScript for Kids: Start Your Coding Adventure Rating: 0 out of 5 stars0 ratingsJavaScript Introduction Rating: 0 out of 5 stars0 ratingsBuilding Blocks : Coder's Hand Book - JavaScript: Coder's Hand Book - JavaScript Rating: 0 out of 5 stars0 ratings
Information Technology For You
An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5CompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsPersonal Knowledge Graphs: Connected thinking to boost productivity, creativity and discovery Rating: 5 out of 5 stars5/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Ultimate Microsoft Power Automate Desktop Rating: 0 out of 5 stars0 ratingsData Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5CompTIA Network+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam N10-008 Rating: 0 out of 5 stars0 ratingsCompTia Security 701: Fundamentals of Security Rating: 0 out of 5 stars0 ratingsDevOps Handbook: What is DevOps, Why You Need it and How to Transform Your Business with DevOps Practices Rating: 4 out of 5 stars4/5Health Informatics: Practical Guide Rating: 0 out of 5 stars0 ratingsChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5REMOTE ACCESS VPN- SSL VPN: A deep dive into SSL VPN from basic Rating: 5 out of 5 stars5/5A Mind at Play: How Claude Shannon Invented the Information Age Rating: 4 out of 5 stars4/5Unlocking the Power of Agentic AI: Transforming Work and Life Rating: 5 out of 5 stars5/5The Domains of Identity: A Framework for Understanding Identity Systems in Contemporary Society Rating: 0 out of 5 stars0 ratingsCOMPUTER SCIENCE FOR ROOKIES Rating: 0 out of 5 stars0 ratingsHow Computers Really Work: A Hands-On Guide to the Inner Workings of the Machine Rating: 0 out of 5 stars0 ratingsApple iPhone iOS 16 New Features Rating: 0 out of 5 stars0 ratingsScrum – A Pocket Guide - 2nd edition Rating: 3 out of 5 stars3/5Blockchain Revolution: How the Technology Behind Bitcoin Is Changing Money, Business, and the World Rating: 3 out of 5 stars3/5Design and Build Modern Datacentres, A to Z practical guide Rating: 3 out of 5 stars3/5AWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5Risk Management and Information Systems Control Rating: 5 out of 5 stars5/5CompTIA ITF+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam FC0-U61 Rating: 5 out of 5 stars5/5Cybersecurity for Beginners : Learn the Fundamentals of Cybersecurity in an Easy, Step-by-Step Guide: 1 Rating: 0 out of 5 stars0 ratingsThe TOGAF® Standard, 10th Edition - A Pocket Guide Rating: 0 out of 5 stars0 ratings
Reviews for Mootools 1.2 Beginners Guide LITE
0 ratings0 reviews
Book preview
Mootools 1.2 Beginners Guide LITE - Jacob Gube
Table of Contents
Mootools 1.2 Beginners Guide: LITE
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action - heading
What just happened?
Pop quiz - heading
Have a go hero - heading
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Writing JavaScript with MooTools
Writing unobtrusive JavaScript with MooTools
An obtrusive
JavaScript example
What's so bad about it?
Don't repeat it if you don't have to
It'll be hard to maintain
It's a bad practice to have functionality in your content structure
Time for action - rewriting our script unobtrusively
What just happened?
Removing our inline event handlers
Using the DOM to handle events
Pop quiz - rewriting our script unobstrusively
Creating MooTools classes
What the heck is a class?
Real-world analogy
Creating a MooTools class
The Implements property
The options property
The initialize method
Our own Dog class methods: .bark() and .sit()
Time for action - creating an instance of Dog
What just happened?
Have a go hero - use the .sit() class method
Time for action - giving our class instance some custom options
Time for action - determining the value of our options
Extending classes
Time for action - extending the ShowDog class with the Dog class
What just happened?
Class inheritance
Have a go hero - doing more with the thing
Using MooTools classes
The concept of chainability
The Chain class
A Chain example
A look ahead: Chaining Fx .Tween
Time for action - create a chain of Fx.Tween methods
What just happened?
Isn't MooTools classy?
Chainability
Have a go hero - doing more with chaining Fx.Tween methods
Summary
2. Selecting DOM Elements
MooTools and CSS selectors
Working with the $() and $$() functions
The $() dollar function
The $$() dollars function
When to use which
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
What just happened?
$() versus document.getElementById()
Selecting multiple sets of elements
Have a go hero - tween the list item element
Common errors with the dollar and dollars functions
The dollar function doesn't work with CSS selectors!
Drop the pound # sign when using the $() function
Pop quiz - find the bad apple in the bunch
Selection using pseudo-classes
Pseudo-class example: Zebra striping a table
Time for action - using pseudo-classes to zebra stripe a table
What just happened?
Other pseudo-class selectors
Working with attribute selectors
Attribute selector operators
Attribute selector example: Styling different types of links
Time for action - using = attribute selector
Time for action - using != attribute selector
Time for action - using ^= attribute selector
Time for action - using $= attribute selector
What just happened?
Attribute selector case sensitivity
DOM selection makes unobtrusive JavaScript do-able
Summary
3. Bringing Web Pages to Life with Animation
MooTools' Fx class
Basic syntax
Fx options
Animating a CSS property with Fx.Tween
Time for action - creating a hide/show FAQ page
What just happened?
Have a go hero - modifying the hide/show transition effect
Tweening a single CSS property using the tween() method
Time for action - toggling the visibility of a div
What just happened?
Fading elements
Time for action - fading an image in and out
What just happened?
Highlighting elements
Time for action - indicating blank form fields that are required
What just happened?
Animating multiple CSS properties with Fx.Morph
Time for action - enlarging an image
What just happened?
Have a go hero - modify the transition type
Using the morph() shortcut method
Time for action - experimenting with morph
What just happened?
Other Fx methods
Starting an effect
Setting properties immediately
Cancelling a transition
Pausing effect
Resuming a paused effect
Summary
Index
Mootools 1.2 Beginners Guide: LITE
Mootools 1.2 Beginners Guide: LITE
Copyright © 2011 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2011
Production Reference: 2120511
Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK.
ISBN 978-1-849516-24-2
www.packtpub.com
Cover Image by Vinayak Chittar ( <[email protected]> )
Credits
Authors
Jacob Gube
Garrick Cheung
Reviewer
Chirstoph Pojer
Acquisition Editor
Douglas Paterson
Technical Editor
Ajay Shanker
Indexer
Hemangini Bari
Production Coordinator
Melwyn D’sa
Cover Work
Melwyn D’sa
About the Authors
Jacob Gube is a massive MooTools developer. He is the founder and Chief Editor of Six Revisions, a website dedicated to web developers and web designers. He’s also