I’m not using JQuery but I know they have functions to do this. I know how to do this in JQuery but I want a pure js solution.
How can I time vary the CSS opacity setting? A unix time stamp has precision to 1000 milliseconds…so that might be one way.
Using clearTimeout and setTimeout would be another way.
What is the best way to do this. I tried looking at JQuery source but could not figure out what they were doing exactly for fadeIn and fadeOut.
Related
Here’s an animation function using setTimeout. You can see it work here: http://jsfiddle.net/jfriend00/GcxdG/.
Note: this is not yet adapted for older IE versions which don’t respond to the
opacitystyle and need to have their opacity set via an IE-specificfiltersetting.