Permalink
Browse files

bugfix

  • Loading branch information...
botelho committed Mar 29, 2013
1 parent 4faba37 commit d80c2968a6952f5f85231a5ad1ec3f1968b7201a
Showing with 17 additions and 10 deletions.
  1. +17 −10 js/jquery.stackslider.js
View
@@ -204,17 +204,24 @@
// support css transitions and 3d transforms
this.support = Modernizr.csstransitions && Modernizr.csstransforms3d;
- var transProperties = {
- 'WebkitTransition' : { transitionEndEvent : 'webkitTransitionEnd', tranformName : '-webkit-transform' },
- 'MozTransition' : { transitionEndEvent : 'transitionend', tranformName : '-moz-transform' },
- 'OTransition' : { transitionEndEvent : 'oTransitionEnd', tranformName : '-o-transform' },
- 'msTransition' : { transitionEndEvent : 'MSTransitionEnd', tranformName : '-ms-transform' },
- 'transition' : { transitionEndEvent : 'transitionend', tranformName : 'transform' }
- };
-
+ var transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd',
+ 'MozTransition' : 'transitionend',
+ 'OTransition' : 'oTransitionEnd',
+ 'msTransition' : 'MSTransitionEnd',
+ 'transition' : 'transitionend'
+ },
+ transformNames = {
+ 'WebkitTransform' : '-webkit-transform',
+ 'MozTransform' : '-moz-transform',
+ 'OTransform' : '-o-transform',
+ 'msTransform' : '-ms-transform',
+ 'transform' : 'transform'
+ };
+
if( this.support ) {
- this.transEndEventName = transProperties[ Modernizr.prefixed( 'transition' ) ].transitionEndEvent + '.stackslider';
- this.transformName = transProperties[ Modernizr.prefixed( 'transition' ) ].tranformName;
+ this.transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ] + '.stackslider';
+ this.transformName = transformNames[ Modernizr.prefixed( 'transform' ) ];
}
this.current = 0;

0 comments on commit d80c296

Please sign in to comment.