资 源 简 介
requireScript plugin for jQuery
Description
Unlike internal $.getScript:
memorize already loaded scripts
allow to load multiple scripts at once
allow to choose parallel or sequential loading for multiple scripts
use browser cache
allow to specify context for callback
Using
$.requireScript(url, callback, [context], [options]);
url - the url of script (or array url of scripts)
callback - function to be executed whenever the script is loaded successfully
context - context of callback function
options - a set of key/value pairs that configure loading (now supported only param parallel (true/false) - using parallel loading for multiple scripts, default: true)
Example
$.requireScript("/js/