1 /* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
4 * A 1/2 second fade-in animation.
7 * @param el {HTMLElement} the element to animate
8 * @param callback {function} function to invoke when the animation is finished
10 YAHOO.widget.TVFadeIn = function(el, callback) {
12 * The element to animate
18 * the callback to invoke when the animation is complete
22 this.callback = callback;
27 this.logger = new ygLogger("TVFadeIn");
31 * Performs the animation
33 YAHOO.widget.TVFadeIn.prototype = {
37 var s = this.el.style;
39 s.filter = "alpha(opacity=10)";
42 // var dur = ( navigator.userAgent.match(/msie/gi) ) ? 0.05 : 0.4;
44 // this.logger.debug("duration: " + dur);
45 // var a = new ygAnim_Fade(this.el, dur, 1);
47 // a.onComplete = function() { tvanim.onComplete(); };
49 // var a = new YAHOO.util.Anim(this.el, 'opacity', 0.1, 1);
50 var a = new YAHOO.util.Anim(this.el, {opacity: {from: 0.1, to: 1, unit:""}}, dur);
51 a.onComplete.subscribe( function() { tvanim.onComplete(); } );
56 * Clean up and invoke callback
58 onComplete: function() {