Archiv
Ansicht:   
Suche   erweiterte Suche

Nachricht aus dem Archiv

Greenslade schrieb am 21.December.2009, 10:15:30 in der Kategorie web.coding

Kann mir ja jemand Helfen

> Sorry aber auf die schnelle sehe ich da keine Änderung.  ;-)
>
> function moveSanta() {
> if ( document.getElementById ) {
>
> var left = document.getElementById( \'santa\' ).style.left;
> var top = document.getElementById( \'santa\' ).style.top;
> if ( parseInt( top ) < 150 ) var newyPos = parseInt( top.substring( 0,
> top.length - 2 ) ) - 6;
> else var newyPos = parseInt( top.substring( 0, top.length - 2 ) ) - 2;
> var newxPos = parseInt( left.substring( 0, left.length - 2 ) ) + 10;
>
> document.getElementById( \'santa\' ).style.left = newxPos - \'px\';
> document.getElementById( \'santa\' ).style.top = newyPos - \'px\';
> if ( newxPos < screen.availWidth ) {
> window.setTimeout(\'moveSanta()\', 80);
> } else {
> document.getElementById( \'santa\' ).style.display = \'none\';
> }
> }
>
> }
> window.setTimeout(\'moveSanta()\', 60);

Hab´s nicht geändert, weil ich dachte, das sorgt für Verwirrung. Wie gesagt, muß wahrscheinlich noch die Startposition angepasst werden.
Archiv
Ansicht:   
Suche   erweiterte Suche
Auf unserer Web-Seite werden Cookies eingesetzt, um diverse Funktionalitäten zu gewährleisten. Hier erfährst du alles zum Datenschutz