FF、Chrome、Safariで問題なく動作するIE8の .hover() に少し問題があります。IE ではエラーなどは発生しません。これが私がこれまでに持っているものです:
- .hover() で動作するメニュー (これは IE8 で動作します)
- .hover() で右から開くフォームで、フォームは jQuery Form、jQuery Validate、qTip を使用します (これは IE8 以外のすべてで機能します)
- 複数の JavaScript ライブラリが読み込まれました: jQuery 1.5.1、jQuery UI、jQuery Form、jQuery Validate、qTip 2、Colorbox
したがって、問題のあるコードは次のとおりです。
$(document).ready(function () {
//menu works great
$(".menu").hover(
function () {
if(!$(this).hasClass('animated')) {
$(this).dequeue().stop().animate({top: 137}, 400,'easeInOutCirc');
}
},
function () {
$(this).addClass('animated').animate({top: 110}, 400,'easeInOutCirc', function() {$(this).removeClass('animated').dequeue();});
}
);
//this works in everything but IE8
$("#contact-bar").hover(
function () {
if(!$(this).hasClass('animated')) {
$(this).dequeue().stop().animate({right: -10}, 400,'easeInOutCirc', function() {$('.qtip').qtip('show');});
}
},
function () {
$(this).addClass('animated').animate({right: -301}, 400,'easeInOutCirc', function() {$(this).removeClass('animated').dequeue(); $('.qtip').qtip('hide');});
}
);
});
CSS(背景を変更したり、画像を入れたりしてみました):
#contact-bar {
position:absolute;
top:282px;
width:352px;
height:360px;
right: -301px;
}
どんな助けでも大歓迎です!