https://github.com/javascriptlove/ready
Cross-browser ready function
https://github.com/javascriptlove/ready
Last synced: 6 months ago
JSON representation
Cross-browser ready function
- Host: GitHub
- URL: https://github.com/javascriptlove/ready
- Owner: javascriptlove
- Created: 2012-08-01T19:03:10.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-08-02T12:28:52.000Z (over 13 years ago)
- Last Synced: 2025-06-24T22:48:02.588Z (7 months ago)
- Language: JavaScript
- Size: 92.8 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ready
=========
A cross-browser way of handling the document onReady event.
Provides a way to set a function that will run after DOM is ready.
# Examples
A common way to use:
```
ready(function() {
// we are ready
console.log('ready!');
});
```
`ready` returns itself, so you can add another function right away:
```
ready(function(){
console.log('ready 1');
})(function() {
console.log('ready 2');
});
```