An inline jQuery script queue for jQuery(function(){})
and jQuery.ready
that more easily enables async loading of jQuery based scripts. It also queues jQuery.noConflict
.
Include jquery-stub.js
before inline code that uses jQuery
.
When using $async you can use jquery-stub-async.js
to hook into the jQuery dependency and/or other dependencies.
You can use fn.toString()
and a regular expression to selectively set the dependencies. jquery-stub-async.js
provides an example.
$async.dependencies('jquery', function() {
// .. queued inline jquery code
});