Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
/ getScripts Public archive

A lightweight asynchronous JavaScript loader.

License

Notifications You must be signed in to change notification settings

nuxy/getScripts

Repository files navigation

getScripts Build Status

jQuery shorthand extended to support ordered asynchronous requests.

Features

  • Compatible with Firefox 3.6+, Chrome, Safari 5+, Opera, and Internet Explorer 7+ web browsers.
  • Compatible with iOS and Android mobile web browsers.
  • Loads and initializes JavaScript in an ordered fashion.
  • Fast and lightweight (jQuery plug-in *only 1.3 kB)

Installation

This package can be easily installed using Bower.

$ bower install getscripts

Add the following Javascript between the <head></head> tags of your HTML document. jQuery plug-in order is important.

<script src="/path/to/jquery.js"></script>
<script src="/path/to/jquery.getScripts.js"></script>

Use example

$(document).getScripts([
  'scripts/1.js',
  'scripts/2.js',
  'scripts/3.js',
  'scripts/4.js',
  'scripts/5.js'
],
function() {
  alert('All scripts loaded');
});

License and Warranty

This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

getScripts is provided under the terms of the MIT license

Author

Marc S. Brooks