Generico will package any custom JS you enter into an AMD module if the template’s “Load via AMD” option is checked. But if you use a 3rd party library and that library doesn’t support AMD, then this will cause an error and your template will break. In your browser console, you might have a “no define call” error that will look like this:
Usually you can’t tell in advance if this will be the case. And usually 3rd party libraries don’t support AMD. (You have been warned.) Its no problem though, you just uncheck “Load via AMD” in the template and that should fix it.
JQuery comes free with AMD in Moodle. You can just assume it is there and access it in the normal way e.g $(‘#mythungy’).click(blah blah blah);
If you are not using AMD though, you may or may not have jquery available. It depends on other things happening on the page, and on your theme. If your theme does not load jQuery, and you try to use it, you may get errors like this in your browser console:
In this case I recommend you load jQuery via your site’s additional html area (site admin -> appearance ->Additional html -> Within HEAD). Like this:
You really should never check it. What can happen if you do, is that template A loads jquery into the global namespace and adds some plugins to it. Then template B loads jQuery again and overwrites what template A did. Then you wonder why the heck template A works on one page, but not another. To avoid this, use a theme that loads jquery or add it to the additional html area as described above.