jQuery fadeTo not working in firefox/chrome
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
精彩评论