An open API service indexing awesome lists of open source software.

https://github.com/bendrucker/document-ready

Document ready listener for modern browsers
https://github.com/bendrucker/document-ready

Last synced: 9 months ago
JSON representation

Document ready listener for modern browsers

Awesome Lists containing this project

README

          

# document-ready

> Document ready listener for modern browsers

## Install

```
$ npm install --save document-ready
```

## Usage

```js
var ready = require('document-ready')

ready(function () {
//=> DOM is ready
})
```

## API

#### `ready(callback)` -> `undefined`

##### callback

*Required*
Type: `function`

A function to call once the DOM has loaded. If the DOM is already loaded, the callback will be called on the next tick.

## License

MIT © [Ben Drucker](http://bendrucker.me)