snaffle
7 years agoExpert
Including Javascript files with JQuery dependancy
We've been able to find documentation on how to use Lithium's included JQuery library inline using:
<@liaAddScript>
and that works a treat, but despite quite a lot of searches on the Community we're struggling to find out how we might include an external Javascript file that has JQuery as a dependancy, and have it use the included Lithium JQuery... so for example:
<script src="${asset.get('/html/assets/off-canvas.js')}" type="text/javascript"></script>
Whenever we do that we either get a "JQuery not defined" message or "jQuery is not a function".
Is that because we would have to modify the included file to work with Lithium's JQuery?
And is the alternative to include our own JQuery?
Thanks
Nathan