Javascript:
In der Konsole habe ich folgende Nachricht gefunden:
Failed to load resource: the server responded with a status of 403 (Forbidden)
Code:
/* Slider */
function Fader(einstellungen) {
if (!einstellungen.id || !document.getElementById(einstellungen.id)
|| einstellungen.images.length < 2) {
return new Boolean(false);
}
var i, original = document.getElementById(einstellungen.id);
this.id = einstellungen.id;
this.images = new Array();
this.counter = 0;
this.element = document.createElement("span");
this.element.className = "fader";
original.parentNode.replaceChild(this.element, original);
for (i = 0; i < einstellungen.images.length; i++) {
this.images[i] = document.createElement("img");
this.images[i].src = einstellungen.images[i];
this.images[i].alt = "Bild";
if (i == 0) {
this.element.appendChild(this.images[i]);
}
}
this.fade = function (step) {
var fader = this, imgs = this.element.getElementsByTagName("img");
step = step || 0;
imgs[1].style.opacity = step/100;
imgs[1].style.filter = "alpha(opacity=" + step + ")"; // IE?
step = step + 2;
if (step <= 100) {
this.timer = window.setTimeout(function () { fader.fade(step); }, 1);
} else {
imgs[1].className = "";
this.element.removeChild(imgs[0]);
this.timer = window.setTimeout(function () { fader.next(); }, 4000);
}
};
this.next = function () {
this.counter = (this.counter < this.images.length -1) ? this.counter +1 : 0;
this.element.appendChild(this.images[this.counter]);
this.images[this.counter].className = "next";
this.fade();
};
/* Slider Navi */
this.goto = function (idx) {
this.counter = idx;
imgs = this.element.getElementsByTagName("img");
if (imgs[1]) {
imgs[1].className = "";
imgs[1].opacity = 1;
this.element.removeChild(imgs[0]);
}
if (imgs[0].src != this.images[this.counter].src) {
this.element.appendChild(this.images[this.counter]);
this.images[this.counter].className = "next";
window.clearTimeout(this.timer);
this.fade();
}
};
/* Slider Navi Ende*/
}
/* Slider Erstellung */
function erstelleFader () {
var einstellungen = {
id: "slideshow",
images: ImageArr
};
for (var i = 0; i < einstellungen.images.length; i++) {
document.getElementById('slider').innerHTML += '<div class="bullet" onclick="window.meine_slideshow.goto(' + i + ');"></div>';
}
if (!window.meine_slideshow) {
window.meine_slideshow = new Fader(einstellungen);
}
window.meine_slideshow.next();
}
window.onload = erstelleFader;
/* Slider Erstellung Ende*/
/* Slider Ende */
In der Konsole habe ich folgende Nachricht gefunden:
Failed to load resource: the server responded with a status of 403 (Forbidden)
Zuletzt bearbeitet: