如何在IE 7中使用JQuery fadeTo()? [英] How can i use JQuery fadeTo() in IE 7?
本文介绍了如何在IE 7中使用JQuery fadeTo()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用jquery fadeTo()在chrome和firefox中工作,但在IE 7中却不工作.下面的代码在IE 7中不工作..
I am using jquery fadeTo() its working in chrome and firefox but not in IE 7. Below code is not working in IE 7..
我固定了table.nav td:have {opacity:0.2;}
I have fixed table.nav td:have{ opacity:0.2;}
运行时我使用jquery将不透明度从0.2更改为1.0
Run time i use jquery to change opacity 0.2 to 1.0
$(document).ready(function() {
$("table.nav td").hover(function() {
$("table.nav td:hover").fadeTo("slow", 1.0);
});
});
推荐答案
我猜这是您希望它如何工作?
I guess this is how you want it to work?
$(function() {
$("table.nav td")
.css("opacity", "0.2") //Doing this in jQuery is better cross browser than just opacity in CSS
.hover(function() {
$(this).fadeTo("slow", 1.0);
},function() {
$(this).fadeTo("slow", 0.2);
});
});
示例: http://jsfiddle.net/wk74b/1/
该代码对我来说在IE7中有效.
That code works in IE7 for me.
这篇关于如何在IE 7中使用JQuery fadeTo()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文