Is there a solution out there where I can have JavaScript/jQuery autoload dependent files when needed? For example, consider this scenario:
- I have an autoloader script listening for when a particular script needs to be loaded.
- A jQuery
dialog()
plugin is called. - The autoloader is told to listen for when this plugin is called, and loads the jQuery UI.
- If more dialogs are called in the future, the required script will not be loaded.
Is this too much effort for simply trying to limit bandwidth? Should I just include all of the core files in one superpackage and be done with it?
Thank you for your time.