Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #10 from Danman7/master

Updated duration option check to test for a valid string.
  • Loading branch information...
commit 87ff7a71b512ebeb78de4dd46744a18de9720add 2 parents c8cb890 + d8b8816
@mcfedr authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Fx.CSS3.js
View
4 Source/Fx.CSS3.js
@@ -182,12 +182,12 @@ provides: [Fx.Tween.CSS3, Fx.Morph.CSS3, Fx.Elements.CSS3]
}.bind(this);
this.element.addEvent(Fx.CSS3Funcs.css3Features.transitionend, this.boundComplete);
-
var trans = function(){
var transStyles = {};
transStyles[Fx.CSS3Funcs.css3Features.transitionProperty] =
properties.reduce(function(a, b) { return a + ', ' + b; });
- transStyles[Fx.CSS3Funcs.css3Features.transitionDuration] = this.options.duration + 'ms';
+ // check if duration is a valid string or number
+ transStyles[Fx.CSS3Funcs.css3Features.transitionDuration] = (Fx.Durations[this.options.duration] || this.options.duration.toInt() || 500) + 'ms';
transStyles[Fx.CSS3Funcs.css3Features.transitionTimingFunction] =
'cubic-bezier(' + Fx.CSS3Funcs.transitionTimings[this.options.transition] + ')';
this.element.setStyles(transStyles);
Please sign in to comment.
Something went wrong with that request. Please try again.