I know how to include a JavaScript file in Page.php, and in the template, but what this loads the javascript regardless if you use it or not.
I was wondering if there is a way to associate a javascript file to each of the pages, so that it is loaded when called, or needed.
The admin content editing area cleans out <script> put in the html code, is there a way to leave the <script> code in?
thanks!