Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Cezary Nowak committed Nov 16, 2014
1 parent 7ddf7c2 commit ef77a9e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ and a context in which to execute the callback.

```js
// Load a single JavaScript file and execute a callback when it finishes.
LazyLoad.js('http://example.com/foo.js', function () {
LazyLoad.js(['http://example.com/foo.js'], function () {
alert('foo.js has been loaded');
});

Expand All @@ -42,22 +42,22 @@ LazyLoad.js(['foo.js', 'bar.js', 'baz.js'], function () {
});

// Load a CSS file and pass an argument to the callback function.
LazyLoad.css('foo.css', function (arg) {
LazyLoad.css(['foo.css'], function (arg) {
alert(arg);
}, 'foo.css has been loaded');
}.bind(null, 'foo.css has been loaded'));

// Load a CSS file and execute the callback in a different scope.
LazyLoad.css('foo.css', function () {
alert(this.foo); // displays 'bar'
}, null, {foo: 'bar'});
}.bind({foo: 'bar'}));
```

Supported Browsers
------------------

* Firefox 2+
* Firefox 3.5+
* Google Chrome
* Internet Explorer 6+
* Internet Explorer 9+
* Opera 9+
* Safari 3+
* Mobile Safari
Expand Down

0 comments on commit ef77a9e

Please sign in to comment.