So I made this function and it works:
var opacity = 9;
function func() {
$("action").style.opacity = "0." + opacity;
opacity--;
if (opacity == -1) { window.clearInterval(fading); }
}
var fading = window.setInterval("func()", 200);
But thats acutally not really one single function.
So I did this:
function fadeOut(ms) {
var opacity = 9;
function func() {
$("action").style.opacity = "0." + opacity;
opacity--;
if (opacity == -1) { window.clearInterval(fading); }
}
var fading = window.setInterval("func()", ms);
}
fadeOut(200);
And suddenly func() is undefined.
Help ? 😐
Change:
to
Am not sure what
$("action")return though, if its jQuery then style is not a valid member of $(“action”).