Skip to content
Add a jQuery .ready() handler that will execute before existing .ready() handlers.
JavaScript
Branch: master
Clone or download
Latest commit db741b8 May 20, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Rename example/example.html to examples/example.html Apr 20, 2017
.gitattributes Update .gitattributes Apr 20, 2017
LICENSE Initial commit Apr 18, 2017
README.md Update README.md May 20, 2017
jquery-before-ready.js Update jquery-before-ready.js Apr 19, 2017

README.md

jQuery-Before-Ready

Add a jQuery .ready() handler that will execute before existing .ready() handlers.

jQuery exeutes .ready() functions in source code order. Sometimes we need to execute a .ready() function early.

Instructions

Load jquery-before-ready.js immediatley after jQuery, or as as early as possible.

Use .beforeReady() instead of .ready(). You should still use .ready() as normal for scripts that do not need early execution.

Example

$.beforeReady(function() {
    alert("Ere I am JH")
});
You can’t perform that action at this time.