
- MooTools Tutorial
- MooTools - Home
- MooTools - Introduction
- MooTools - Installation
- MooTools - Program Structure
- MooTools - Selectors
- MooTools - Using Arrays
- MooTools - Functions
- MooTools - Event Handling
- MooTools - DOM Manipulations
- MooTools - Style Properties
- MooTools - Input Filtering
- MooTools - Drag and Drop
- MooTools - Regular Expression
- MooTools - Periodicals
- MooTools - Sliders
- MooTools - Sortables
- MooTools - Accordion
- MooTools - Tooltips
- MooTools - Tabbed Content
- MooTools - Classes
- MooTools - Fx.Element
- MooTools - Fx.Slide
- MooTools - Fx.Tween
- MooTools - Fx.Morph
- MooTools - Fx.Options
- MooTools - Fx.Events
- MooTools Useful Resources
- MooTools - Quick Guide
- MooTools - Useful Resources
- MooTools - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MooTools - Quint Transition
This displays a quintic transition with in, out, and in-out events. Let us take an example wherein, we add a mouse down event to a div element along with quintic events. Take a look at the following code.
Example
<!DOCTYPE html> <html> <head> <style> #quintic_in { width: 100px; height: 20px; background-color: #F4D03F; border: 2px solid #808B96; } #quintic_out { width: 100px; height: 20px; background-color: #F4D03F; border: 2px solid #808B96; } #quintic_in-out { width: 100px; height: 20px; background-color: #F4D03F; border: 2px solid #808B96; } </style> <script type = "text/javascript" src = "MooTools-Core-1.6.0.js"></script> <script type = "text/javascript" src = "MooTools-More-1.6.0.js"></script> <script type = "text/javascript"> window.addEvent('domready', function() { $('quintic_in').addEvent('mousedown', function(event) { this.set('tween', {duration: 'long', transition: 'quint:in'}); this.tween('width', [80, 400]); }); $('quintic_out').addEvent('mousedown', function(event) { this.set('tween', {duration: 'long', transition: 'quint:out'}); this.tween('width', [80, 400]); }); $('quintic_in-out').addEvent('mousedown', function(event) { this.set('tween', {duration: 'long', transition: 'quint:in-out'}); this.tween('width', [80, 400]); }); }); </script> </head> <body> <div id = "quintic_in"> Quintic : in</div><br/> <div id = "quintic_out"> Quintic : out</div><br/> <div id = "quintic_in-out"> Quintic : in-out</div><br/> </body> </html>
You will receive the following output
Output
mootools_fxoptions.htm
Advertisements