Flash-in Animations

The flash_in, green_flash, and red_flash animations are factory methods that return pre-configured animation objects.

YUI().use('lazr.anim', function(Y) {

    var yellow = Y.lazr.anim.flash_in(...);    // A yellow flash.
    var green  = Y.lazr.anim.green_flash(...); // A green flash.
    var red    = Y.lazr.anim.red_flash(...);   // A red flash.

});

The only configuration option you need to specify is the node that the animation will target. Any additional options will override the flash-in animation defaults.

# A blue flash-in animation

var blue_flash = Y.lazr.anim.flash_in({
    node: '#target',
    from: { backgroundColor: '#000099' }  // Override the default
});

blue_flash.run();