How to fix Prototype conflict with Highchart?

前端 未结 1 600
夕颜
夕颜 2020-12-22 02:44

I have an AJAX action and trying to use Highchart at the same time that\'s why I need Prototype to be included.

Here is my code but is not showing the Highchart grap

相关标签:
1条回答
  • 2020-12-22 02:49

    Wrap your jQuery into an anonymous function to protect the variable from being interfered with by Prototype. http://jsfiddle.net/amyamy86/s6ms3/

    (function($) {
    
        $.noConflict();
        $(function () {
            $('#contain').highcharts({
             ....
            });
         });
    
    }(jQuery));
    
    0 讨论(0)
提交回复
热议问题