I have seen Scriptaculous.js file to include its required javascript files dynamically. Is there any better approach to include javascript dynamically.
For example,
You can use the jQuery.getScript() function... I think it will be much easier to you with this to include a JavaScript .js file.
jQuery.getScript()
.js
Here is the reference.