Davs Rants and Random Thoughts

September 3, 2006

widget.Effects updated … again

Filed under: yui, javascript, code, Yahoo! — Dav Glass @ 10:43 pm

I added 7 more effects to my widget.Effects addon..

  • YAHOO.widgets.Effects.BlindRight()
  • YAHOO.widgets.Effects.BlindLeft()
  • YAHOO.widgets.Effects.Fold()
  • YAHOO.widgets.Effects.ShakeLR()
  • YAHOO.widgets.Effects.ShakeTB()
  • YAHOO.widgets.Effects.Pulse()
  • YAHOO.widgets.Effects.Drop()

Keep asking & I will keep building 8-)

Add to:
| Digg it | Slashdot | Y! MyWeb

7 Responses to “widget.Effects updated … again”

  1. MyAvatars 0.2 Mat Says:

    Haven’t quite decided how they could be used practically for projects but the examples you give are very much appreciated.

  2. MyAvatars 0.2 Dav Glass Says:

    Mat –

    These Effects can make development very simple. For example, if you had a div for warnings (id: warning) & all you wanted to do was notify the user that they need to read it, you could apply the YAHOO.widget.ShakeLR() from inside of your verify function like this:

    function verify() {
    //Your logic here
    YAHOO.widget.ShakeLR(’warning’);
    }

    The main usage of these Effects are for those Web Dev’s out there that want simple one-line effects that work as they expect them to..

    Hope that helps.

  3. MyAvatars 0.2 Chris Griego Says:

    I could really use Effect.SlideUp and Effect.SlideDown :)

  4. MyAvatars 0.2 Dav Glass Says:

    Chris –

    You can get the same effect by using the Blind Up & Blind Down, you just have to mod the element with some css 8-)

    Here’s an example:
    http://blog.davglass.com/files/yui/effects/slide.php

  5. MyAvatars 0.2 Dustin Diaz Says:

    Something you might want to take into consideration is adding the custom events - which is something you get with the animation utility, but you’ve removed that functionality with these ones.

    I wrote this quite a bit back in yui’s early stages: http://www.dustindiaz.com/basement/effects.html
    It was only a proof of concept at the time, but allowing the developer to pass in a method for onComplete would be good. Or you could perhaps just make another custom event for it. Eg: myShake.onComplete.subscribe( function() { } );

    Overall though, this is really great stuff you’ve put together man. Keep it up :)

  6. MyAvatars 0.2 Dav Glass Says:

    Thanks, I really wanted to add some custom event supprt to them, but I ran into a glitch that I need to work out..

    Some of the effects already have an onComplete method assigned to make the effect work as expected..

    My issue, is that there is no “nice” way to say that x onComplete function comes before y..

    I was getting mixed results, as with the Effect.Batch, it will only work with effects that have no onComplete functions..

    I think I know how to make it do what I want, just don’t currently have the time to impliment it 8-)

    Anyway, thanks for the compliment & maybe I’ll meet you someday on campus…

  7. MyAvatars 0.2 Dav Glass Says:

    Just an update. In my latest release of the Effects 0.5, I have implemented a custom event called onEffectComplete. Check out the docs here.

Leave a Reply

© 2008 Dav Glass - All content is mine, except comments. Comments are the property of the poster. I speak for no person or company.
Can you tell me what this says? 01000100 01100001 01110110 01101001 01100100 00100000 01000111 01101100 01100001 01110011 01110011