views:

298

answers:

1

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.

+2  A: 

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

Jonathan Sampson
Seemed I was using a buggy version of jQuery. I was actually referencing the vsdoc version of 1.4.1. When I changed it to the minned version, it worked fine.
Ely
That was definitely my problem. VSDOC version shouldn't be used outside of VS. Odd, how it's buggy.
Andrew Dunkman