Development

dgDojoPlugin/DojoEffects (diff)

You must first sign up to be able to contribute.

Changes between Version 16 and Version 17 of dgDojoPlugin/DojoEffects

Show
Ignore:
Author:
Dean.Glazeski (IP: 68.225.171.15)
Timestamp:
07/20/08 06:39:15 (9 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • dgDojoPlugin/DojoEffects

    v16 v17  
    255255                                                                                         'unit'  => 'px')))); 
    256256echo dojo_link_to_function('Click Me to Animate!', $animate->play()); 
     257?> 
     258}}} 
     259 
     260== Dojo Add Class Effect == 
     261 
     262The !DojoAddClassEffect extends [wiki:dgDojoPlugin/DojoEffects#DojoEffect DojoEffect] and adds the 'class' option for setting what class needs to be added.  This class will create Javascript that will attempt to animate the element chosen to add the desired class.  It's a little iffy in a chain or combination, but works well enough outside of that. 
     263 
     264=== Examples === 
     265 
     266Classes are declared in the head. 
     267 
     268{{{ 
     269<style type="text/css"> 
     270.fun { 
     271    line-height: 22pt; 
     272    margin-left: 50px; 
     273    font-size: 16pt; 
     274} 
     275</style> 
     276}}} 
     277 
     278{{{ 
     279#!php 
     280<?php 
     281// Let's add fun to the effect element 
     282$addFun = new DojoAddClassEffect('effect', array('class' => 'fun')); 
     283echo dojo_button_to_function('Add Fun', $addFun->play()); 
     284?> 
     285}}} 
     286 
     287== Dojo Remove Class Effect == 
     288 
     289The !DojoRemoveClassEffect extends [wiki:dgDojoPlugin/DojoEffects#DojoEffect DojoEffect] and adds the 'class' option for setting what class needs to be removed.  This class will create Javascript that will attempt to animate the element chosen to remove the desired class.  It's a little iffy in a chain or combination, but works well enough outside of that. 
     290 
     291=== Examples === 
     292 
     293Classes are declared in the head. 
     294 
     295{{{ 
     296<style type="text/css"> 
     297.fun { 
     298    line-height: 22pt; 
     299    margin-left: 50px; 
     300    font-size: 16pt; 
     301} 
     302</style> 
     303}}} 
     304 
     305{{{ 
     306#!php 
     307<?php 
     308// Let's remove fun to the effect element 
     309$removeFun = new DojoRemoveClassEffect('effect', array('class' => 'fun')); 
     310echo dojo_button_to_function('Stop Having Fun', $removeFun->play()); 
     311?> 
     312}}} 
     313 
     314== Dojo Toggle Class Effect == 
     315 
     316This class is kind of neat because it toggles a certain class on an element.  Even though this extends [wiki:dgDojoPlugin/DojoEffects#DojoEffect DojoEffect] it is unable to use all of the available options.  Dojo has not yet released a toolkit that enables this animation to have the full set of arguments like 'duration' or 'delay'. 
     317 
     318=== Examples === 
     319 
     320Assuming the fun class is declared in CSS. 
     321 
     322{{{ 
     323#!php 
     324<?php 
     325// Let's toggle the fun on and off 
     326$toggleFun = new DojoToggleClassEffect('changeClass', array('class' => 'fun')); 
     327echo dojo_button_to_function('Toggle Fun', $toggleFun->play()); 
    257328?> 
    258329}}}