Permalink
Browse files

Merge pull request #4 from WebReflection/patch-1

as soon as duration is defined avoid other parseFloat operations
  • Loading branch information...
2 parents db7bbc3 + 3e54a67 commit d34f284c794dd317b9db8b1cd906c275aef5b61d @snookca committed Oct 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 preparetransition.js
View
@@ -30,7 +30,7 @@ $.fn.prepareTransition = function(){
var cl = ["transition-duration", "-moz-transition-duration", "-webkit-transition-duration", "-o-transition-duration", "-ms-transition-duration"];
var duration = 0;
$.each(cl, function(idx, itm){
- duration = parseFloat( el.css( itm ) ) || duration;
+ duration || (duration = parseFloat( el.css( itm ) ));
});
// if I have a duration then add the class

0 comments on commit d34f284

Please sign in to comment.