Posted By

Butterflyland on 08/13/07


Tagged


Versions (?)

Script


 / Published in: JavaScript
 

  1. var fade = function(element) {
  2. var fn = function(opac) {
  3. var passed = parseInt(opac);
  4. var newOpac = parseInt(passed+10);
  5. if ( newOpac <= 90 ) {
  6. element.style.opacity = '.'+newOpac;
  7. element.filter = "alpha(opacity:"+newOpac+")";
  8. setTimeout("fn('"+newOpac+"')",20);
  9. }
  10. else {
  11. element.style.opacity = '1';
  12. element.style.filter = "alpha(opacity:100)";
  13. }
  14. }(0);
  15. };

Report this snippet  

You need to login to post a comment.