So pretty new to jQuery and Im having some problems getting this script to work in IE7&8.
Any help would be much appreciated.
You can check out the actual files at:
http://www.uaf.com/default2.htm (jquery is in the head section)
http://www.uaf.com/default2/includes/main.css $(function(){
var thisInterval = setInterval("rotateSlides()", 5000);
$("#slide1").addClass('current');
$("#Btn1").mouseover( function(){
$("#slideshow > div").css({opacity:0.0});
clearInterval(thisInterval);
var $curPhoto1 = $("#slideshow div.current");
var $nxtPhoto1 = $("#slideshow #slide2");
$curPhoto1.removeClass('current').addClass('previous');
$nxtPhoto1.css({opacity:0.0}).addClass('current').animate({opacity: 1.0}, 250,
function(){
$curPhoto1.removeClass('previous');
});
});
$("#Btn2").mouseover( function(){
$("#slideshow > div").css({opacity:0.0});
clearInterval(thisInterval);
var $curPhoto2 = $("#slideshow div.current");
var $nxtPhoto2 = $("#slideshow #slide3");
$curPhoto2.removeClass('current').addClass('previous');
$nxtPhoto2.css({opacity:0.0}).addClass('current').animate({opacity: 1.0}, 250,
function(){
$curPhoto2.removeClass('previous');
});
});
$("#Btn3").mouseover( function(){
$("#slideshow > div").css({opacity:0.0});
clearInterval(thisInterval);
var $curPhoto3 = $("#slideshow div.current");
var $nxtPhoto3 = $("#slideshow #slide4");
$curPhoto3.removeClass('current').addClass('previous');
$nxtPhoto3.css({opacity:0.0}).addClass('current').animate({opacity: 1.0}, 250,
function(){
$curPhoto3.removeClass('previous');
});
});
$("#Btn4").mouseover( function(){
$("#slideshow > div").css({opacity:0.0});
clearInterval(thisInterval);
var $curPhoto4 = $("#slideshow div.current");
var $nxtPhoto4 = $("#slideshow #slide5");
$curPhoto4.removeClass('current').addClass('previous');
$nxtPhoto4.css({opacity:0.0}).addClass('current').animate({opacity: 1.0}, 250,
function(){
$curPhoto4.removeClass('previous');
});
});
});
function rotateSlides(){
var $curPhoto = $("#slideshow div.current");
var $nxtPhoto = $curPhoto.next();
if($nxtPhoto.length==0)
$nxtPhoto = $("#slideshow div:first");
$curPhoto.removeClass('current').addClass('previous');
$nxtPhoto.css({opacity:0.0}).addClass('current').animate({opacity: 1.0}, 500,
function(){
$curPhoto.removeClass('previous');
});
}