How to fix Prototype conflict with Highchart?

前端 未结 1 599
夕颜
夕颜 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)
提交回复
热议问题