I currently have my website with some simple JQuery animation but it doesnt work in anything but Safari and I dont know where im going wrong:
http://www.mousehouse.org.uk/index.php
// Header Animations
$('nav ul li #Global_Logo').animate({'background-position-y': '0px'}, 150)
.hover(function(){
$(this).stop().animate({'background-position-y': '-107px'}, 150);
}, function(){
$(this).stop().animate({'background-position-y': '0px'}, 150);
});
And this one:
// Work Links Animations
$('#Global_Work li a').stop().animate({backgroundPositionY: "0px", backgroundPositionX: "0px"}, 0)
.hover(function(){
$(this).stop().animate({backgroundPositionY: "-300px", backgroundPositionX: "0px"}, 150);
}, function(){
$(this).stop().animate({backgroundPositionY: "0px", backgroundPositionX: "0px"}, 150);
});
There seems to be an issue with
backgrgroundPositionY(andX) in FireFox and Opera. A common workaround is thestepmethod ofanimate: http://api.jquery.com/animate/You can animate some hidden css-property like
border-spacingand take this as an stepper for yourstepmethod:This worked in my FireBug console, so I hope it works for you!