Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
staaky committed Jun 5, 2015
1 parent d2be573 commit 90e0daa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Voilà is a [jQuery](http://jquery.com) plugin that provides callbacks for image

[voila.nickstakenburg.com](http://voila.nickstakenburg.com)

Voilà has an API inspired by [imagesLoaded](https://github.com/desandro/imagesloaded), extended with useful methods like `abort()` and support for `naturalWidth` and `naturalHeight` in all browsers, which makes it compatible with *IE6 & IE7*. Multiple loading methods are supported. Allowing callbacks to be triggered as soon as `naturalWidth` is available, making Voilà faster than alternatives that wait for `onload` to fire.
Voilà has an API inspired by [imagesLoaded](https://github.com/desandro/imagesloaded), extended with useful methods like `abort()` and support for `naturalWidth` and `naturalHeight` in all browsers, which makes it compatible with *IE6 & IE7*. Multiple loading methods are supported, allowing callbacks to fire as soon as `naturalWidth` is available, making Voilà faster than alternatives that wait for `onload` to fire.

## Install

Expand Down Expand Up @@ -70,7 +70,7 @@ $('#container').voila()

Options can be set as the first parameter.

+ `method` - _String_ - The loading method, the default is `'onload'` which calls callbacks as soon as `onload` fires. The alternative is `'naturalWidth'`, which calls callbacks as soon as `naturalWidth` is available, images will have dimensions at that point but could still be in the process of rendering. Don't use `'naturalWidth'` when changing the `src` attribute of an image, it becomes unreliable at that point, use `'onload'` instead.
+ `method` - _String_ - The loading method, the default is `'onload'` which calls callbacks as soon as `onload` fires. The alternative is `'naturalWidth'`, which calls callbacks as soon as `naturalWidth` is available, images will have dimensions at that point but could still be rendering. **Don't** use `'naturalWidth'` when changing the `src` attribute of an image, it becomes unreliable at that point. Use `'onload'` instead in those cases.

```js
// callback as soon as naturalWidth & naturalHeight are available
Expand Down

0 comments on commit 90e0daa

Please sign in to comment.