Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

demand


Include file on demand

Average rating
(3 votes)

This tool include files(Javascript and / or CSS) in the head of the document and load. You can pass a single file or a array of files (can be mix of CSS or Javascript). You can passa a callback to execute some code after the script has loaded.

This plugin is useful for load scripts on demand or insert components for ajax calls.

The plugin checks if the file already exist before add and the callback for Style files wasn´t fully tested because of tricks of browsers*

Usage

Single javascript file

$.include('file.js');

Array of files

$.include(['file.js','file02.js']);

Even a mix of file

$.include(['script.js','style.css']);

You can specify the base path to be used in all calls of the plugin

$.includeBasePath = 'path/to/include';

You can have a callback to execute code when script has loaded