I just uploaded a new site and noticed after a while (my fault) that the fade in/fade out effect on the navigation menu does not work on IE. It's driving me crazy because it works perfectly in all other browsers. Any ideas why?
Here is the link to the site: http://www.sveiki-constructions.com And here is the jquery:
$(document).ready(function(){
function preload(arrayOfImages) {
$(arrayOfImages).each(function(){
$('<images/>')[0].src = this;
});
}
preload([
'home_default.jpg',
'home_lowbudget.jpg',
'home_coldroom.jpg',
'home_cleanroom.jpg',
'home_distribution.jpg',
'home_distribution.jpg',
'home_mini.jpg',
'home_panels.jpg'
]);
$('.link ').hover(
function(){
$(this).css({'background-color':'#333333'});
var imgloc= $(this).find('a').attr('alt');
var oldpic =$('.homeContainer .image img');
var oldsrc= $(oldpic).attr('src');
var newpic =$('<img src="images/' + imgloc + '.jpg">');
var newsrc= $(newpic).attr('src');
if(newsrc !== oldsrc){
$('.homeContainer .image').prepend(newpic);
newpic.hide();
newpic.fadeIn(500);
oldpic.fadeOut(500, function(){
$this.remove();
});
}
},
function(){
$(this).css({'background-color':'#1c3261'});
})
$('.homeContainer .image').prepend('<img src="images/home_default.jpg">');
});