1. Scott Koon
  2. bootstrap

Source

bootstrap /

Filename Size Date modified Message
tools
23 B
added .hgignore
45 B
Added tag 1.0 for changeset 5be6efbb12cb
895 B
updated README
1.3 KB
recompacted source
4.6 KB
A test caught a problem when assigning an id to a script.
883 B
added tests for config object and array
163 B
added Google Closure compiler, re-minified bootstrap
34 B
added ability to load css files
3.5 KB
A test caught a problem when assigning an id to a script.
0 B
added two blank js files needed for testing
0 B
added two blank js files needed for testing
Bootstrap is a small library for dynamically loading JavaScript files.
It's primary use case is for using in your JS code to load JS files only when they are used.
syntax:

bootstrap("script file name.js","id you want the script element to have");

or

$b("script file name.js","id you want the script element to have");

You can also not pass in an id and Bootstrap will assign a random one to your script tag

alternatively, you can pass in a call back function.
$b("script file name.js", "id of your element", callBackFunction);

The ID element is also optional if you are not passing in a call back.

If you'd like to specify multiple files, you can either pass in an array containing
the names/urls of the scripts you would like to load or you can pass in a config object
using the following format:
{
    "{id for the script tag}" : "{name or url for the script}"
}