Javascript Jquery悬停效果不';我不在IE工作

Javascript Jquery悬停效果不';我不在IE工作,javascript,jquery,effects,Javascript,Jquery,Effects,尝试删除悬空逗号: body { margin:1em; padding:0; height:100%; background-color:#cccccc; color:#000000; text-align:center; font-family:Arial, Helvetica, sans-serif; font-size:1em; border-style: thin; } .img{ float right; padding-left: 3em; borde

尝试删除悬空逗号:

body {
margin:1em;
padding:0;
height:100%;
background-color:#cccccc;
color:#000000;  
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:1em;
border-style: thin;
}

.img{
    float right;
    padding-left: 3em;
    border:thin black ;

}
#reg{font-family:"Palatino Linotype";


}

#centerColumn {
    margin: 0 auto;
    padding: 1em;
    width: 50em;
    text-align: left;
    vertical-align: bottom;
    background-color: #ffffff;
    border: 1px solid #999999;
}


#header {
    border-style: thin;
    background-position: center;
    margin: -1em -1em 0 -1em;
    padding: 0 0 0 0;
    height: 15.5em;
    background-color: #ffffff;

    background-attachment: scroll;
background-repeat:no-repeat; 

}


#footer {
position:relative;
bottom:0;
margin:4em 0 0 0;
padding: 1em 1em 1em 1em;
height:5em;
line-height:4em;
text-align:center;
font-size:.8em;
background-color:#cccccc;
border-top:1px solid #999999;
}

/*****remove the list style****/

#nav {
margin:0;
padding:0;
list-style:none;
}

/*****LI display inline *****/
#nav li {
float:left;
display:block;
width:7em;
background:#0063dc;
position:relative;
z-index:500;
margin:0 1px;
}

/*****parent menu*****/
#nav li a {
display:block;
padding:5px 5px 5px 5px;

font-weight:700;
height:38px;
text-decoration:none;
color:#696969;
text-align:center;
color:#ffeecc;
}

#nav li a:hover
{
color:#eeeeee;
}

/* style for default selected value */ #nav a.selected {
color:#6699FF;
}
/* submenu */ #nav ul
{
position:absolute;
left:0;
display:none;
margin:0 0 0 -1px;
padding:0;
list-style:none;
}

#nav ul li
{
width:7em;
float:left;
overflow:hidden;

border-top:1px solid #eeeeee;
}

/* display block will make the link fill the whole area of LI */
 #nav ul a
{
display:block;
height:32px;
padding: 7px 4px;
color:white;
}

#nav ul a:hover
{
text-decoration:none;
padding-left:none;
}
因此:

$('ul', this).animate({opacity: "show", }, "slow");
如果它不起作用,请确保IE没有以怪癖模式呈现您的页面,也没有使用旧的呈现引擎,方法是通过以下方式启动HML:

$('ul', this).animate({opacity: "show"}, "slow");

尝试使用.find()而不是$('ul',this)

范例 $(this).find('ul').animate(等…)

下面是一个使用示例链接到js fiddle的链接。它似乎做了你想做的事情,并且在ie8中工作


希望这对你有所帮助

基本上,
fadeIn
在IE上确实有效(而且@SLaks告诉我
opacity:show
也有效),所以问题是为什么它在你的页面上有这种奇怪的行为。你能引用相关的CSS和HTML吗?请尝试实际格式化你的代码,并尽可能地发布一个小样本。它的格式是否不正确?我把html和css分开了。我想添加这两个选项,因为这似乎不是所有的意图和目的都应该发生的。您是否尝试使用{opacity:1}而不是{opacity:show}另外,在IE8怪癖模式下,不透明度不起作用:(虽然这是正确的,但它并没有解释症状。这会产生语法错误,所以它根本不应该显示出来。@SLaks:没错。看起来是设置了$.fx.off。可能是用怪癖模式呈现的。我们甚至不知道它是哪个IE版本,HTML和样式是什么样子,或者运行的是什么其他代码。这是IE 8,不是吗如果没有其他代码正在运行,并且在其他浏览器中都可以正常工作,请稍等,我将引用html@wootwoot:查看是否可以使用复制此行为。是的,它在该示例中的作用与在我的页面上的相同。它只是出现,但不会淡入。它在除IE之外的所有其他浏览器中都可以正常工作
$('ul', this).animate({opacity: "show"}, "slow");
<!doctype html>
<html lang="en-us">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">