Ich blende mittels javascript ein kleines Div ein. Dies funktioniert auf wie es soll. Jetzt hätte ich gerne das es aber nicht einfach nur auftaucht sondern das es etwas "smooth" abläuft.
habe dafür die folgende Funktion geschrieben:
|
Quellcode
|
1
2
3
4
5
6
7
8
|
function smooth(elem){
var crossobj2 = document.getElementById(elem);
//crossobj2.style.filter = crossobj2.style.filter + 10;
crossobj2.style.-moz-opacity = crossobj2.style.-moz-opacity + 0.01;
if (crossobj2.style.filter <= 80) {
setTimeout("smooth('div1')", 250);
}
}
|
Aufrufen tue ich das ganze mittels "smooth('div1');" direkt im Div.
Daraufhin wird einfach nichts mehr ausgeführt was mit js zu tun hat.
Hat jemand ne idee