So i have been developing and testing with jquery inline. I am using CodeIgniter - the below refers to my views.
I have <script="text/javascript">JQUERY CODE</script>
at the top of my page. Some of my code is dynamic in that it uses PHP vars. E.G when making an ajax call, the URL is preceeded by <?php echo base_url();?>
So now I have gotten the code working, I want to put it in an external JS file for cleanliness - thinking about this, there is seemingly no way. Am I correct?
One aspect of my site is google maps. I use them all over the place. Again, parts of the code are dynamic, from PHP. Same question.
As a slight change - with the maps, i have many pages with many slightly different maps on them. Is there anyway to efficiently reuse map code, or am i going to have to have some duplicate code?
Thanks