Loading jQuery-based script into another script
Hello everyone,
I have a two php files and I want both of them to use jquery.mask plugin. The first file, main.php is available here http://pastebin.com/W0bMwAbA and the second one (script.php) is here http://pastebin.com/g3qVUN0m
That code doesn't work because second file doesn't see the <script> block in the first file. If I put the last two lines from that block to the second file, everything works fine. Is there a way to have a single <script> block to handle a main file and all loaded content? Or the main rule is to include suitable javascript lines in each file except including them once globally in 'parent file'?