How can I dynamically load and execute all of the Javascript files in a directory?
        Posted  
        
            by Andrew
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andrew
        
        
        
        Published on 2010-04-05T19:33:19Z
        Indexed on 
            2010/04/05
            19:43 UTC
        
        
        Read the original article
        Hit count: 284
        
I'm making a very simple content-management system in Javascript. It uses plugins which are individual .js files which live in a "modules" folder. Currently I'm loading them with JQuery's getScript() function, but I have to manually define the list of available modules.
Is there any way to dynamically load the list of Javascript files so that the user can install additional modules by simply dropping them into the "modules" folder?
© Stack Overflow or respective owner