jQuery淡入不工作在Firefox /铬 [英] jQuery fadeTo not working in firefox/chrome

查看:152
本文介绍了jQuery淡入不工作在Firefox /铬的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用jQuerys fadeTo方法做一个简单的例子。它在IE8中按预期工作,但不会淡出Chrome / Firefox 3.6。无论是fadeTo调用还是按钮中的按钮,都可以在chrome / ff中单击工作。任何想法?
$ b $ p代码:

  $(document).ready (function(){
$(img,div)。fadeTo(slow,.5);

$(input b $ b $(img,div)。fadeTo(slow,.1);
});
});

html包含一个简单的img和div标记。我试图弄清楚如何让HTML显示在SO上。

解决方案

4.0.249.89(38071))和Firefox(3.5.8)。我的猜测是你的问题在别处。请确保您没有在其他浏览器中加载缓存版本。这是我立即想到会导致这样一个问题的唯一原因。

演示: http://jsbin.com/ijovu/edit


I'm trying to do a simple example using jQuerys fadeTo method. It works as expected in IE8, but doesn't fade out Chrome/Firefox 3.6. Niether the fadeTo call or the one in the button click work in chrome/ff. Any ideas?

Code:

    $(document).ready(function () {
        $("img, div").fadeTo("slow", .5);

        $("input").click(function () {
            $("img, div").fadeTo("slow", .1);
        });
    });    

The html contains a simple img and div tag. I'm trying to figure out how to get the html to display on SO.

解决方案

Works just fine for me in Chrome (4.0.249.89 (38071)) and Firefox (3.5.8). My guess is that your problem is elsewhere. Be sure that you're not loading a cached version in the other browsers. This is the only cause I can immediately think of that would cause such an issue.

Demo: http://jsbin.com/ijovu/edit

这篇关于jQuery淡入不工作在Firefox /铬的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆