Timdaroxxa
Lieutenant
- Registriert
- März 2009
- Beiträge
- 954
Hi,
Die Divs kann man anklicken.
Je nachdem welches man anklickt, soll ein anderes Bild sichtbar werden.
Mein Problem: Das Script funktioniert nur mit dem IMG welches an erster Stelle ist.
Kennt jemand die Lösung;
Gruß Ich
<img src="" width="100%" class="background2">
<img src="" width="100%" class="background1">
$('div.image_wrapper').click(function() {
var currentId = $(this).attr('id');
$('.' +currentId).animate({
opacity: 1
}, 1000 );
$('div.content').hide("slide", { direction: "right" }, 1000, function() {
$('#go_back').show("slide", { direction: "right" }, 1000);
$('#info').animate({
opacity: 1
}, 1000 );
});
});
<div id="background1"></div>
<div id="background2"></div>
Die Divs kann man anklicken.
Je nachdem welches man anklickt, soll ein anderes Bild sichtbar werden.
Mein Problem: Das Script funktioniert nur mit dem IMG welches an erster Stelle ist.
Kennt jemand die Lösung;
Gruß Ich