Alex: Div öffnen und andere schließen

Beitrag lesen

Hallo,

function swap(targetID) {
obj = document.getElementById(targetID);
obj.style.display = (obj.style.display == 'block') ? 'none' : 'block';

if (lastID && lastID != targetID){
document.getElementById(lastID).display = "none";
}

<a href=" ...Was kommt dann hier hin?...('sub4Div')">Fotos</a>

Die Funktion heißt    swap    also solltest du auch swap reinschreiben ;)
Dann wird das auch klappen

Gruß
Alex