8000 Make `.css('transition', 'transform 1s')` add vendor prefixes to the … · f2er/jquery.transit@b9385ea · GitHub
[go: up one dir, main page]

Skip to content

Commit b9385ea

Browse files
committed
Make .css('transition', 'transform 1s') add vendor prefixes to the transitioned properties. (atotic, rstacruz#84)
2 parents 985e282 + 97ef30f commit b9385ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jquery.transit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@
323323
if (this._translateX === undefined) { this._translateX = 0; }
324324
if (this._translateY === undefined) { this._translateY = 0; }
325325

326-
if (x !== null) { this._translateX = unit(x, 'px'); }
327-
if (y !== null) { this._translateY = unit(y, 'px'); }
326+
if (x !== null && x !== undefined) { this._translateX = unit(x, 'px'); }
327+
if (y !== null && y !== undefined) { this._translateY = unit(y, 'px'); }
328328

329329
this.translate = this._translateX + "," + this._translateY;
330330
}
@@ -418,7 +418,7 @@
418418

419419
$.each(props, function(key) {
420420
key = $.camelCase(key); // Convert "text-align" => "textAlign"
421-
key = $.transit.propertyMap[key] || key;
421+
key = $.transit.propertyMap[key] || $.cssProps[key] || key;
422422
key = uncamel(key); // Convert back to dasherized
423423

424424
if ($.inArray(key, re) === -1) { re.push(key); }

0 commit comments

Comments
 (0)
0