さまざまなリンクがクリックされたときにバナー画像をナビゲートするための非常に単純なコードがあります。これは Chrome ではうまく機能しますが、Internet Explorer ではうまく機能しません。
.stop()
IEがそれを無視し、ロード時に背景画像を元の位置に戻すように見えることと関係があると思います。
誰かが回避策を知っていますか?
これが私のコードです:
$(function(){
//Begin navigation banner animations
$(".home").click(function(){
$("#banner").stop().animate({'background-position-x' : '-250px'},3000);
});
$(".releases").click(function(){
$("#banner").stop().animate({'background-position-x' : '-550px'},3000);
});
$(".events").click(function(){
$("#banner").stop().animate({'background-position-x' : '0px'},3000);
});
$(".artists").click(function(){
$("#banner").stop().animate({'background-position-x' : '-1250px'},3000);
});
$(".gallery").click(function(){
$("#banner").stop().animate({'background-position-x' : '-850px'},3000);
});