我有一个条形图在firefox和chrome中完美运行,但在Internet Explorer中没有。 有人帮帮我吗? 谢谢。 https://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); } }); });
试试这个:
$(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); } }); });
以上就是jQuery教程分享JQuery动画不在IE中工作相关内容,想了解更多jQuery开发(异常处理)及jQuery教程关注计算机技术网(www.ctvol.com)!)。
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/jquerytutorial/548004.html