jQuery Flot Animator plotanimator不是一个方法
我目前正在与jQuery Flot Animator合作,并尝试制作一个简单的线图动画。我收到了错误 未捕获类型错误:对象函数(e,n){返回新的x.fn.init(e,n,t)} 没有方法“plotanimator”testflot.html:17(匿名函数) testflot.html:17 x.event.dispatch jquery.js:4676 y.handle jQuery与flot和animator文件一起加载,所以我真的不确定发生了什么jQuery Flot Animator plotanimator不是一个方法,jquery,jquery-animate,flot,Jquery,Jquery Animate,Flot,我目前正在与jQuery Flot Animator合作,并尝试制作一个简单的线图动画。我收到了错误 未捕获类型错误:对象函数(e,n){返回新的x.fn.init(e,n,t)} 没有方法“plotanimator”testflot.html:17(匿名函数) testflot.html:17 x.event.dispatch jquery.js:4676 y.handle jQuery与flot和animator文件一起加载,所以我真的不确定发生了什么 <!doctype html&g
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" type="text/javascript"></script>
<script src="libraries/flot/jquery.flot.min.js" type="text/javascript"></script>
<script src="libraries/flot/jquery.flot.animator.min.js" type="text/javascript"></script>
</head>
<body>
<div id="chart" style="width: 500px; height: 300px;"></div>
<script type="text/javascript">
$(window).load(function () {
var d8 = [[2, 5],[4, 8],[6, 2],[7, 5],[9,1],[10, 4],[12, 5],[13, 6],[14, 4]];
$.plotanimator($("#chart"), [{ data : d8, animator: { start: 100, steps: 99, duration: 1000, direction: "left" } }]);
//$.plot($("#chart"), [{data:d8}]);
});
</script>
</body>
</html>
无标题文件
$(窗口)。加载(函数(){
变量d8=[[2,5]、[4,8]、[6,2]、[7,5]、[9,1]、[10,4]、[12,5]、[13,6]、[14,4];
$.plotanimator($(“#图表”),[{数据:d8,动画:开始:100,步数:99,持续时间:1000,方向:“左”}]);
//绘图($(“#图表”),[{data:d8}]);
});
在jquery.flot.animator.js文件中做了一些深入研究,发现尽管作者的网站说明使用.plotanimator,但实际上应该是.plotanimator。而不是
$.plotanimator
应该是:
$.plotAnimator