我有一个条形图,在firefox& chrome,但不在Internet Explorer中。有人帮帮我吗?谢谢。 http://jsfiddle.net/FkUYf/6/
$(document).ready(function(){
$(document).scroll(function() {
var top = $(document).scrollTop();
console.log(top);
if (top > 300) {
$("#html, #css").animate({width:"100%"}, 2000);
$("#javascript").animate({width:"40%"}, 2000);
$("#php").animate({width:"50%"}, 2000);
$("#mysql").animate({width:"30%"}, 2000);
$("#wordpress").animate({width:"60%"}, 2000);
}
});
});
答案 0 :(得分:2)
试试这个:
$(document).ready(function(){
$(document).scroll(function() {
var top = $(document).scrollTop();
console.log(top);
if (top > 300) {
$("#html, #css").animate({width:"100%"}, 2000)
$("#javascript").animate({width:"40%"}, 2000);
$("#php").animate({width:"50%"}, 2000);
$("#mysql").animate({width:"30%"}, 2000);
$("#wordpress").animate({width:"60%"}, 2000);
}
});
});