Skip to content
jQuery.ready queue to enable async loading of jQuery.
Branch: master
Clone or download
Latest commit 9773510 Jul 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
jquery-stub-async.js
jquery-stub.js 0.0.1 Jun 30, 2019
package.json

README.md

jQuery Stub

Inline jQuery(function(){}) and jQuery.ready queue to enable async loading of jQuery. 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 simply hook into the jQuery dependency or other dependencies.

You could use fn.toString() and a regular expression to selectively set the dependencies.

$async.js({
    src: '', // to save size, $async does not verify src and fails when omitted.
    inline: callback_name + '();', 
    dependencies: 'jquery', 
    exec_timing: 'requestIdleCallback'
});
You can’t perform that action at this time.