Rouven: Zeitgesteurtes Ein-/Ausblenden von Layern

Beitrag lesen

Hi,

weißt du wie ein-/ausblenden funktioniert? Wenn nicht document.getElementById+style+visibility.

Dazu startest du im onload-Event ein window.setInterval, das eine Austauschfunktion aufruft.

Zusätzlich legst du eine globale Variable an, in der du dir merkst welches Bild du gerade anzeigst (alternativ kannst du auch einfach gucken welches von beiden gerade visible ist oder du gehst einfach alle durch und invertierst ihren Visibility-Wert).

MfG
Rouven

--
-------------------
Computer programming is tremendous fun. Like music, it is a skill that derives from an unknown blend of innate talent and constant practice. Like drawing, it can be shaped to a variety of ends: commercial, artistic, and pure entertainment. Programmers have a well-deserved reputation for working long hours but are rarely credited with being driven by creative fevers. Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination, but because their imagination reveals worlds that others cannot see. -- Larry OBrien and Bruce Eckel in Thinking in C#