Permalink
Browse files

Merge pull request #1 from rafalwrzeszcz/fix/ui-behaviors

Fixed initialization of UI behaviors.
  • Loading branch information...
2 parents 19ac2f8 + 5b720f6 commit fc413e97119924170c2cc5e2bc1db42cd347df7e @sgruhier committed Aug 13, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/carousel.js
View
@@ -56,6 +56,9 @@
this.container.observe('carousel:sliding:stop', _updateScrollButton.bind(this));
+ UI.addBehavior(this.prev, [UI.Behavior.Hover, UI.Behavior.Focus]);
+ UI.addBehavior(this.next, [UI.Behavior.Hover, UI.Behavior.Focus]);
+
_updateScrollButton.call(this);
_createSlider.call(this);
_createPaginator.call(this);
@@ -105,7 +108,6 @@
} else if (this.options.cycle === 'loop') {
this.goTo(this.elements.length - this.nbVisibleElements);
}
- UI.addBehavior(this.prev, [UI.Behavior.Hover, UI.Behavior.Focus]);
if (!Object.isUndefined(event)) {
event.stop();
}
@@ -117,7 +119,6 @@
} else if (this.options.cycle === 'loop') {
this.goTo(0);
}
- UI.addBehavior(this.next, [UI.Behavior.Hover, UI.Behavior.Focus]);
if (!Object.isUndefined(event)) {
event.stop();
}

0 comments on commit fc413e9

Please sign in to comment.