悬停和自定义属性在 IE8 上不起作用
悬停和自定义属性在 IE8 上根本不起作用,即使在兼容模式下也是如此。我有以下代码(fiddle),它可以在 mozilla、opera、safari 和 chrome 中工作,但是不是IE8。
HTML
<ul>
<li class="aniRunmated" bxTab="home_pane">Home</li>
<li class="animated" bxTab="news_pane">News</li>
<li class="animated" bxTab="project_pane">Project Outline</li>
<li class="animated" bxTab="gallery_pane">Gallery</li>
<li class="animated" bxTab="downloads_pane">Downloads</li>
<li class="animated" bxTab="links_pane">Links</li>
</ul>
<div id="home_pane" class="tabbed">Home</div>
<div id="news_pane" class="tabbed">News</div>
<div id="project_pane" class="tabbed">Project</div>
<div id="gallery_pane" class="tabbed">Gallery</div>
<div id="downloads_pane" class="tabbed">Downloads</div>
<div id="links_pane" class="tabbed">Links</div>
jQuery
$('li.animated').hover(function(){
$(this).addClass('active');
},function(){;
$(this).removeClass('active');
});
$('[bxTab]').click(function(){
$('.tabbed').css('display','none');
$('#'+$(this).attr('bxTab')).css('display','block');
});
我尝试使用不同版本的 jquery,1.3.2 和 1.4.2,但似乎没有任何效果
Hover and custom attribute isn't working for me at all on IE8, not even in compatibility mode. I have the following code(fiddle) which is working in mozilla, opera, safari, and chrome, but not IE8.
HTML
<ul>
<li class="aniRunmated" bxTab="home_pane">Home</li>
<li class="animated" bxTab="news_pane">News</li>
<li class="animated" bxTab="project_pane">Project Outline</li>
<li class="animated" bxTab="gallery_pane">Gallery</li>
<li class="animated" bxTab="downloads_pane">Downloads</li>
<li class="animated" bxTab="links_pane">Links</li>
</ul>
<div id="home_pane" class="tabbed">Home</div>
<div id="news_pane" class="tabbed">News</div>
<div id="project_pane" class="tabbed">Project</div>
<div id="gallery_pane" class="tabbed">Gallery</div>
<div id="downloads_pane" class="tabbed">Downloads</div>
<div id="links_pane" class="tabbed">Links</div>
jQuery
$('li.animated').hover(function(){
$(this).addClass('active');
},function(){;
$(this).removeClass('active');
});
$('[bxTab]').click(function(){
$('.tabbed').css('display','none');
$('#'+$(this).attr('bxTab')).css('display','block');
});
I've tried usign different versions of jquery, 1.3.2 and 1.4.2 and nothing seems to work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除了额外的分号。谢谢你的提示。
There was additional semicolen remved. Thanks for the tip.