See title. It seems to load fine and transitions nicely into one picture, but then refuses to work after that.
When I used Chrome to check and see what's wrong, it told me it didn't recognize the slideSwitch function, even though things worked fine when I tested it out locally.
Anyway, I hope the masters here at stackoverflow will be able to help my feeble minded self.
Thanks in advance.
jQuery code:
$(function slideSwitch() {
var $active = $('#slideshow img.active');
if ($active.length == 0) $active = $('#slideshow img:last');
var $next = $active.next().length ? $active.next() : $('#slideshow img:first');
$active.addClass('last-active');
$next.css({
opacity: 0.0
}).addClass('active').animate({
opacity: 1.0
}, 2000, function () {
$active.removeClass('active last-active');
});
});
$(function () {
setInterval("slideSwitch()", 5000);
});
And here's it's accompanying CSS:
#slideshow {
height:327px;
border:thick #000;
list-style:none;
margin:0px auto;
width:600px;
overflow: hidden;
position:relative;
}
#slideshow img {
border: solid #000000 10px;
display:block;
position:absolute;
z-index: 8;
}
#slideshow img.active {
z-index:10;
}
#slideshow img.last-active {
z-index:9;
}