jQuery fadeTo not working in firefox/chrome

2019-07-16 06:03发布

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.

1条回答
孤傲高冷的网名
2楼-- · 2019-07-16 06:43

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

查看更多
登录 后发表回答