Fleet tables giving "$ .plot are not a function"

I tried fleet diagrams, but I continue to encounter this error:

TypeError: $ .plot is not a function

I have imported all the necessary javascripts before my own functions.

HTML:

<div class="row"> <div id="monthly_balance" class="col-md-12" style="height: 200px;"> </div> </div> 

JS:

 <script src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script> <script src="//cdn.jsdelivr.net/bootstrap/3.3.4/js/bootstrap.min.js"></script> <script src="//cdn.jsdelivr.net/excanvas/r3/excanvas.compiled.js"></script> <script src="//cdn.jsdelivr.net/jquery.flot/0.8.4/jquery.flot.min.js"></script> <script type="text/javascript"> $(function () { var data = [[1, 12], [2, 25], [3, 4]]; //examplelist var options = { series: { lines: { show: true }, points: { show: true } } }; $.plot($("#monthly_balance"), data, options) }); </script> 

My js is at the bottom of the page (I also tried to put it in my head, but kept the same error).

+5
source share
1 answer

The file http://cdn.jsdelivr.net/jquery.flot/0.8.4/jquery.flot.min.js not found on the server, so there is an error. Correct the script link and everything will be fine.

For example: http://cdn.jsdelivr.net/jquery.flot/0.8.3/jquery.flot.min.js works fine. There is currently no version 0.8.4 from the CDN.

+6
source

Source: https://habr.com/ru/post/1216451/


All Articles