Include an external Javascript file using JQuery

Include an external Javascript file using JQuery

Last updated:

inside a javascript file, add this:

$.getScript('/js/lib.js');

that will include the file lib.js, the same way you would use include or require in, for example, PHP.

docs

Dialogue & Discussion