Skip to content

Commit

Permalink
re-add missing 'index' from .each() callback
Browse files Browse the repository at this point in the history
  • Loading branch information
sjwilliams committed Jul 29, 2015
1 parent f15bda4 commit 0e4f26e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ Iterate over each item, passing the item to a callback.
* *callback:* Function

```js
this.each(function(item){
this.each(function(item, index){
item.el.append('<h2>'+item.id+'</h2>');
});
```
Expand Down Expand Up @@ -834,6 +834,9 @@ Disable scroll updates. This is useful in the rare case when you want to manipul
Enable scroll updates.

### Release History
*0.3.4*
* Fixed missing 'index' passed to `.each()` callback that was original added in [Issue 7](https://github.com/sjwilliams/scrollstory/issues/7), but got lost in the 0.3 rewrite.

*0.3.3*
* Added [Issue 24](https://github.com/sjwilliams/scrollstory/issues/24) New `setup` event.

Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.scrollstory.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @preserve ScrollStory - v0.3.3 - 2015-06-09
* @preserve ScrollStory - v0.3.3 - 2015-07-29
* https://github.com/sjwilliams/scrollstory
* Copyright (c) 2015 Josh Williams; Licensed MIT
*/
Expand Down Expand Up @@ -883,7 +883,7 @@
for (i = 0; i < length; i++) {
item = items[i];
if (exceptions.indexOf(item) === -1) {
callback(item);
callback(item, i);
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.scrollstory.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jquery.scrollstory.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@
for (i = 0; i < length; i++) {
item = items[i];
if (exceptions.indexOf(item) === -1) {
callback(item);
callback(item, i);
}
}
},
Expand Down

0 comments on commit 0e4f26e

Please sign in to comment.