【问题标题】:jQuery .hover() problem on IE8IE8 上的 jQuery .hover() 问题
【发布时间】:2011-05-05 21:22:04
【问题描述】:

我对 IE8 中的 .hover() 有一点问题,它可以在 FF、Chrome 和 Safari 中正常工作。 IE 不会给出任何错误或任何错误。这是我目前所拥有的:

  1. 与 .hover() 一起使用的菜单(适用于 IE8)
  2. 使用 .hover() 从右侧打开的表单,该表单使用 jQuery Form、jQuery Validate 和 qTip(除 IE8 之外的所有设备都可以使用)
  3. 加载了多个 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


【解决方案1】:

首先我发现 html 可能有问题。见截图。为什么在 IE 上 #Table_02quisiera-contratar-a-redvel_ 中?查看验证器结果:Error Line 74, Column 37: end tag for "form" omitted, but OMITTAG NO was specified。检查时告诉。

【讨论】:

  • 永远不会忘记再次与 w3c 核对
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-08-25
  • 1970-01-01
  • 2013-01-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多