Skip to content

Commit

Permalink
Added optional attribute data-index to delayed items to control their…
Browse files Browse the repository at this point in the history
… order
  • Loading branch information
LeaVerou committed May 5, 2012
1 parent 5ae40f7 commit 8749c19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slideshow.js
Expand Up @@ -397,6 +397,9 @@ self.prototype = {

// Update items collection
this.items = $$('.delayed, .delayed-children > *', this.slides[this.slide]);
this.items.sort(function(a, b){
return (a.getAttribute('data-index') || 0) - (b.getAttribute('data-index') || 0)
});
this.item = 0;

this.projector && this.projector.goto(which);
Expand Down

0 comments on commit 8749c19

Please sign in to comment.