2

I have an HTML file which includes a JS file in the head tag..

<script type='text/javascript' src='lib/head.core.min.js'></script>
<script type='text/javascript' src='custom/my.js'></script>

In the my.js file I try to load another JS file to use in my.js:

head.load("custom/foo.js");

But anytime I try to execute a function from foo.js I get the following error:

Error after calling a function from *foo.js*

Am I doing something in an incorrect way?

Dropout
  • 13,653
  • 10
  • 56
  • 109

1 Answers1

4

You need to include head.load.min.js, not head.core.min.js to use the head.load function.

Aleksander Blomskøld
  • 18,374
  • 9
  • 76
  • 82