MooTools is a JavaScript framework that abstracts the JavaScript language. JavaScript itself, complex in syntax, provides the tools to write a layer of content interaction for each different browser. MooTools abstracts those individual, browser-specific layers to allow cross-browser scripting in an easy-to-read and easy-to-remember syntax.
Animation and interaction, once the domain of Flash, are being taken by storm by the MooTools JavaScript framework, which can cause size, shape, color, and opacity to transition smoothly. Discover how to use Ajax to bring data to today's web page users who demand interactivity without clunky page refreshes. When searching for animation and interactivity solutions that work, MooTools 1.3 Cookbook has individual, reusable code examples that get you running fast!
MooTools 1.3 Cookbook readies programmers to animate, perform Ajax, and attach event listeners in a simple format where each section provides a clear and cross-browser compatible sketch of how to solve a problem, whether reading from the beginning to the end or browsing directly to a particular recipe solution.
MooTools 1.3 Cookbook provides instant solutions to MooTools problems whatever you want to do with MooTools, this book will tell you how to do it.
MooTools 1.3 Cookbook is presented in a progressive order that builds concepts and ideas, while simultaneously being a collection of powerful individual, stand-alone, recipe solutions.
Chapter 1, Oldies-but-Goodies: Foundational Moo. Learn foundational MooTool basics like including MooTools in HTML, making and looping over arrays, grabbing elements, and dragging items!
Chapter 2, Switching Paddles Midstream: Changing HTML After Page Load. Delve into changing HTML after load with working examples of finding, moving, adding, and removing elements and groups of elements.
Chapter 3, And on the 8th Day: Creating HTML Elements. Create HTML elements like IFRAMEs, A tags, and form elements and inject them into tables, table rows, and div elements.
Chapter 4, That's Not All Folks: Animation and Scrolling. Animate the Internet with morphs, tweens, slides, and scrolls. Make thumbnails scroll and users drool.
Chapter 5, Mr. Clean Uses Ajax: Remote Asynchronous Calls. Fire remote Ajax calls, on page, bringing them into the Web 2.0 arena where user interfaces are cool and fun.
Chapter 6, Easy Come, Easy Go: Drag and Drop. Drag and drop your way to shopping carts and interfaces that create return users and Internet buzz.
Chapter 7, Knock and the Door Will Open: Events and Listeners. Open the door to flexibility and functionality by adding event listeners and chains of actions.
Chapter 8, Dynamite! (Movin' On Up): Working with Transitions. Use transitions to save space, welcome users, make ducks bounce, and golf balls roll.
Chapter 9, WTFudge is Going On?: Troubleshooting MooTools. Troubleshoot scripting issues with tools of the professional development trade.
Chapter 10, Enough Is Never Enough: Extending MooTools. MooTools is highly extensible and allows for simple extension of existing classes and DOM elements. Level up by extending MooTools with custom plugins.
To run the examples in the book following software will be required:
Web Server: Apache recommended
Apache 1.3 or Apache 2.x, Apache 2.x recommended
Microsoft IIS 5, IIS 6 or IIS 7, IIS 7 recommended
#
Software Name
URL
1
Apache
2
Microsoft IIS
Additionally the following tools are helpful, but are not strictly required:
PHP:
PHP 5.2 recommended
PHP 5.2 or PHP 5.3, PHP 5.2 recommended
ColdFusion:
ColdFusion 8 or 9 recommended
#
Software Name
URL
1
PHP
2
ColdFusion
Users of all skill levels will find this book useful. Advanced users will expand their knowledge of MooTools interaction. Intermediate users will delve into new concepts of usage. Novice users will find they are carefully taken through each facet of knowledge necessary to rapidly become intermediate users.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "Please do always include a DOCTYPE
, and opening HTML, HEAD, TITLE
, and META
tag for the HTTP-EQUIV
and CONTENT
".
A block of code is set as follows:
$('my_trigger').addEvent('click',function() { this.set('html','Click Me<br/>'+(++count)); ...
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<div id="my_trigger"
style="width:100px; height:100px;
border:1px solid #BEBEBE;
line-height:50px; text-align:center;">You Found Me!</div>
<noscript>JavaScript is disabled.</noscript>
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "The link labeled GET MOO.FX FOR MOOTOOLS leads us to MooTools".
Feedback from our readers is always welcome. Let us know what you think about this book what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>
.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.