【发布时间】:2011-05-05 21:22:04
【问题描述】:
我对 IE8 中的 .hover() 有一点问题,它可以在 FF、Chrome 和 Safari 中正常工作。 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;
}
非常感谢任何帮助!
【问题讨论】:
-
你有在线的吗?例如在 findle 上?
标签: jquery internet-explorer internet-explorer-8 hover jquery-hover