开发者

jQuery fadeTo not working in firefox/chrome

开发者 https://www.devze.com 2022-12-21 08:54 出处:网络
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.开发者_如何学GoNiether the fadeTo call or the one in the button cli

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.开发者_如何学Go 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

0

精彩评论

暂无评论...
验证码 换一张
取 消