True, combining files would be the best option. I'm thinking in the case where I would like to detect weather or not a specific plugin is required. So if x element exists then include x plugin. Just looking for something like the Dojo require, which loads its' modules.
Another option I thought of is to $('head').append('<script ...></ script>'); On Nov 11, 3:13 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote: > Are you going to always be loading these .js files into your page? > > If so, the most efficient option by far is to concatenate all of them into a > single .js file that you load with a single <script> tag. > > Maybe explain more about why you want a bootstrap file, and what exactly you > want it to do? > > -Mike > > > From: Panman > > > Are browsers able to cache calls from jQuery.getScript > > (http:// docs.jquery.com/Ajax/jQuery.getScript)? I'm just > > trying to determine either to use that or just use HTML > > <script> tags to get jQuery plugin files and such. Would like > > the most officiant option. The reason being, I'd like to > > break out the first option into a separate JavaScript file, > > like a bootstrap file. > > > Option 1: > > <script type="text/javascript" src="/_assets/js/jquery.js"></script> > > <script type="text/javascript"> > > $.getScript("/_assets/js/jquery.ui.all.js"); > > $.getScript("/_assets/js/jquery.hoverIntent.js"); > > </script> > > > </script> > > > Option 2: > > <script type="text/javascript" src="/_assets/js/jquery.js"></script> > > <script type="text/javascript" src="/_assets/js/jquery.ui.all.js"></ > > script> > > <script type="text/javascript" src="/_assets/js/ > > jquery.hoverIntent.js"></script>