Closed dasoncheng closed 7 years ago
/*not work*/ move('#example-1 .box') .set('margin-left', 200) .end(); /*work*/ move('#example-1 .box') .set('margin-left', '200px') .end(); // prop : margin-left width height (prop have 'px')--- can not work // prop : opacity color---is ok
Move.prototype.set
Move.prototype.set = function(prop, val){ this.transition(prop); this._props[prop] = val; return this; };
Move.prototype.add
Move.prototype.add = function(prop, val){ if (!style) return; var self = this; return this.on('start', function(){ var curr = parseInt(self.current(prop), 10); self.set(prop, curr + val + 'px'); }); };
Move.js version ge 0.4.0