From 815b4434b97b55dbe7fdb444bd7989f7e81a5efd Mon Sep 17 00:00:00 2001
From: kipz Morphing 2 elements example
+ *
+ * new S2.FX.Parallel([ // the parallel effect itself
+ * new S2.FX.Morph('element1_id', { // morph element1_id
+ * after: function() // after execution function
+ * {
+ * $('element2_id').update('morphing!'); // write this after executing
+ * },
+ * delay: 0.1, // just a little starting delay
+ * duration: 0.9, // duration should equal 1 sec w/ delay
+ * position: 'parallel', // the queue position is 'parallel'
+ * style: 'height: 150px; width: 350px;', // resize our first element from 0x0
+ * transition: 'spring' // a transition for element morphing
+ * }),
+ * new S2.FX.Morph('element2_id', { // morph element2_id
+ * after: function() // after execution function
+ * {
+ * $('element2_id').update('finished!'); // write this after executing
+ * },
+ * delay: 0.25, // delay this slightly behind above
+ * duration: 0.75, // duration should equal 1 sec w/ delay
+ * position: 'parallel', // the queue position is 'parallel'
+ * style: 'opacity: 1; color: orange;', // morph the text we inserted
+ * transition: 'easeInOutCubic' // a transition for the text morphing
+ * }),
+ * ],{
+ * duration: 1 // the overall length of this effect
+ * });
**/
S2.FX.Parallel = Class.create(S2.FX.Base, {
initialize: function($super, effects, options) {
From d3028c211f514f95a245881cac542f09819bb78f Mon Sep 17 00:00:00 2001
From: kipz
To use scripty2, include this line in your HTML: -
<script src="prototype.scripty2.min.js" type="text/javascript"></script>
+ <script src="prototype.s2.min.js" type="text/javascript"></script>
For debugging, you can also include the libraries seperately:
From 73f7d0dbfda4d1d207af425190d76ce41e788ce2 Mon Sep 17 00:00:00 2001
From: kipz
This rewrite of the script.aculo.us library is in beta. While we advise to proceed with caution,
- scripty2 used in many live, production projects like twistori
+ scripty2 is used in many live, production projects like twistori
and freckle and it works great!
Morphing 2 elements example
*
@@ -34,6 +34,14 @@
* ],{
* duration: 1 // the overall length of this effect
* });
+ *
+ * Notes
+ *
+ * It is recommended that you set any effects position to "parallel" to ensure
+ * that it will be executed properly.
+ *
+ * As shown above, anything from [[S2.FX.Base]] can be applied to the parallel
+ * effect itself.
**/
S2.FX.Parallel = Class.create(S2.FX.Base, {
initialize: function($super, effects, options) {
From 50e42f8702bc6b787376f955315878c7e5d5f835 Mon Sep 17 00:00:00 2001
From: kipz