mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Revert "Revert "Offset: allow offset setter to throw for disconnected elements""
This reverts commit 578dcee96a
.
This commit is contained in:
parent
951c4eafa5
commit
999010b2e7
@ -36,10 +36,6 @@ QUnit.test( "jQuery()", function( assert ) {
|
|||||||
expected++;
|
expected++;
|
||||||
attrObj[ "width" ] = 10;
|
attrObj[ "width" ] = 10;
|
||||||
}
|
}
|
||||||
if ( jQuery.fn.offset ) {
|
|
||||||
expected++;
|
|
||||||
attrObj[ "offset" ] = { "top": 1, "left": 1 };
|
|
||||||
}
|
|
||||||
if ( jQuery.fn.css ) {
|
if ( jQuery.fn.css ) {
|
||||||
expected += 2;
|
expected += 2;
|
||||||
attrObj[ "css" ] = { "paddingLeft": 1, "paddingRight": 1 };
|
attrObj[ "css" ] = { "paddingLeft": 1, "paddingRight": 1 };
|
||||||
@ -111,10 +107,6 @@ QUnit.test( "jQuery()", function( assert ) {
|
|||||||
assert.equal( elem[ 0 ].style.width, "10px", "jQuery() quick setter width" );
|
assert.equal( elem[ 0 ].style.width, "10px", "jQuery() quick setter width" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( jQuery.fn.offset ) {
|
|
||||||
assert.equal( elem[ 0 ].style.top, "1px", "jQuery() quick setter offset" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( jQuery.fn.css ) {
|
if ( jQuery.fn.css ) {
|
||||||
assert.equal( elem[ 0 ].style.paddingLeft, "1px", "jQuery quick setter css" );
|
assert.equal( elem[ 0 ].style.paddingLeft, "1px", "jQuery quick setter css" );
|
||||||
assert.equal( elem[ 0 ].style.paddingRight, "1px", "jQuery quick setter css" );
|
assert.equal( elem[ 0 ].style.paddingRight, "1px", "jQuery quick setter css" );
|
||||||
|
Loading…
Reference in New Issue
Block a user