0

For Highcharts, I have to load this Javascript:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

And for the autofill search box, I have to load this Javascript:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.1/jquery-ui.min.js"></script>    

It seems that one cancels the other. Are these scripts conflicting and if so, how do I solve this?

3
  • You try to load two differents versions of jquery.. Commented May 5, 2014 at 12:45
  • Why do you need to versions of jQuery? Pick one. Highcharts should run on the latest. Commented May 5, 2014 at 12:45
  • Always consider to use only one jQuery version. Now sometimes it's more easy to just use then jQuery noConflict() but that's not what is advised Commented May 5, 2014 at 12:46

2 Answers 2

2

You'll need to load one jQuery version or other, but don't load it twice.

Highcharts may expect jQuery 1.8.2 or newer, while jQuery UI 1.10.1 expects jQuery 1.9.1 or newer.

Just add the newest jQuery version and check if both Highcharts and jQuery work as expected.

Sign up to request clarification or add additional context in comments.

5 Comments

So leave out the 1.8.2 ?
@KasperVanLombeek No, I mean you need to use 1.9.1 (the newest).
@MatíasFidemraizer So answer to Kasper's comment is yes
@KasperVanLombeek In other words, since jQuery UI requires at least 1.9.1, this is the version of jQuery you need to add to your page.
@A.Wolff Yes, I just understood in the wrong way, sorry.
2

You're loading two versions of jQuery. The last one loaded will overwrite the value of jQuery and any plugins that may have been added to the previous jQuery object.

Chances are your plugins will work on more than that one specific version, though. If Highcharts will work with 1.9.1 you can remove the reference to 1.8.2 altogether, although you should make sure that 1.9.1 is loaded before you load the Highcharts plugin.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.