Skip to content

Commit

Permalink
cleanup fx.js
Browse files Browse the repository at this point in the history
  • Loading branch information
madrobby committed Jul 3, 2011
1 parent 4058d56 commit 788c597
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/fx.js
@@ -1,25 +1,24 @@
(function($, undefined){

var supportedTransforms = [
'scale', 'scaleX', 'scaleY',
'scale scaleX scaleY',
'translate', 'translateX', 'translateY', 'translate3d',
'skew', 'skewX', 'skewY',
'rotate', 'rotateX', 'rotateY', 'rotateZ',
'matrix'
];

$.fn.anim = function(properties, duration, ease, callback){
var transforms = [], cssProperties = {}, key, that = this;
var transforms = [], cssProperties = {}, key, that = this, wrappedCallback;

for (key in properties)
if (supportedTransforms.indexOf(key)>0)
transforms.push(key + '(' + properties[key] + ')');
else
cssProperties[key] = properties[key];

var wrappedCallback = function(){
that.css( { '-webkit-transition': 'none' } );
callback && callback();
wrappedCallback = function(){
that.css({'-webkit-transition':'none'});
callback && callback();
}

if (duration > 0)
Expand Down

0 comments on commit 788c597

Please sign in to comment.