I can't find anything in the docs about how to include snippets of JS or local JS files, that contain jQuery (I have jQuery itself included from a CDN). Whatever I have tried has resulted in errors ranging from $ is not defined
to jQuery requires a window with a document
. Any pointers?