Skip to content

Instantly share code, notes, and snippets.

@robu
Created April 21, 2009 06:44
Show Gist options
  • Select an option

  • Save robu/98987 to your computer and use it in GitHub Desktop.

Select an option

Save robu/98987 to your computer and use it in GitHub Desktop.
function fadeOut(id) {
var elem = document.getElementById(id);
var colorTo = elem.style.backgroundColor;
var attribs = { color: {to: colorTo} };
var anim = new YAHOO.util.ColorAnim(id, attribs);
anim.onComplete.subscribe(function() {
elem.style.display = 'none';
});
anim.animate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment