mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix breaking test in Chrome.
This commit is contained in:
parent
c5edf982d5
commit
659773348f
4
src/effects.js
vendored
4
src/effects.js
vendored
@ -189,7 +189,7 @@ jQuery.fn.extend({
|
|||||||
|
|
||||||
if ( parts ) {
|
if ( parts ) {
|
||||||
var end = parseFloat( parts[2] ),
|
var end = parseFloat( parts[2] ),
|
||||||
unit = parts[3] || jQuery.cssNumber[ name ] ? "" : "px";
|
unit = parts[3] || ( jQuery.cssNumber[ name ] ? "" : "px" );
|
||||||
|
|
||||||
// We need to compute starting value
|
// We need to compute starting value
|
||||||
if ( unit !== "px" ) {
|
if ( unit !== "px" ) {
|
||||||
@ -348,7 +348,7 @@ jQuery.fx.prototype = {
|
|||||||
this.startTime = jQuery.now();
|
this.startTime = jQuery.now();
|
||||||
this.start = from;
|
this.start = from;
|
||||||
this.end = to;
|
this.end = to;
|
||||||
this.unit = unit || this.unit || jQuery.cssNumber[ this.prop ] ? "" : "px";
|
this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
|
||||||
this.now = this.start;
|
this.now = this.start;
|
||||||
this.pos = this.state = 0;
|
this.pos = this.state = 0;
|
||||||
|
|
||||||
|
2
test/unit/effects.js
vendored
2
test/unit/effects.js
vendored
@ -922,7 +922,7 @@ test("hide hidden elements, with animation (bug #7141)", function() {
|
|||||||
|
|
||||||
test("animate unit-less properties (#4966)", 2, function() {
|
test("animate unit-less properties (#4966)", 2, function() {
|
||||||
stop();
|
stop();
|
||||||
var div = jQuery( "<div style='z-index: 0'></div>" ).appendTo( "body" );
|
var div = jQuery( "<div style='z-index: 0; position: absolute;'></div>" ).appendTo( "#main" );
|
||||||
equal( div.css( "z-index" ), "0", "z-index is 0" );
|
equal( div.css( "z-index" ), "0", "z-index is 0" );
|
||||||
div.animate({ zIndex: 2 }, function() {
|
div.animate({ zIndex: 2 }, function() {
|
||||||
equal( div.css( "z-index" ), "2", "z-index is 2" );
|
equal( div.css( "z-index" ), "2", "z-index is 2" );
|
||||||
|
Loading…
Reference in New Issue
Block a user