»» // Abruchbedingen wenn der Text zuende ist:
»» // Mit document.Inhalt.top - document.Inhalt.document.heigh bekommst du den unteren »» Rand
»» // des Layers. Wenn der <= der Fensterhöhe ist d.h. wenn das ende des Layers zusehn »» ist
»» // wird die funktion nicht mehr aufgerufen.
»» if (document.Inhalt.top - document.Inhalt.document.height <= window.innerHeight)
»» {window.clearInterval(dup);}
Die Bedingung ist murks. Zumal sie natürlich beim runter und beim hoch scrollen unter schiedlich ist. Hier noch mal die beiden funktionen
function hoch()
{
if (document.Inhalt.top + document.Inhalt.document.height <= window.innerHeight)
{window.clearInterval(dup);return;}
document.Inhalt.moveBy(0,-15);
}
function runter()
{
if (document.Inhalt.top >= 10)
{window.clearInterval(dup);return;}
document.Inhalt.moveBy(0,15);
}
So jetzt gehts. Nun ist das ganze auch getestet *s*
Sorry für den murks ist schon früh.
cu knut