mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 15:15:00 -05:00
Revert "Offset: allow offset setter to throw for disconnected elements"
This reverts commit 0d11c1182f.
This commit is contained in:
@@ -36,6 +36,10 @@ test("jQuery()", function() {
|
||||
expected++;
|
||||
attrObj["width"] = 10;
|
||||
}
|
||||
if ( jQuery.fn.offset ) {
|
||||
expected++;
|
||||
attrObj["offset"] = { "top": 1, "left": 1 };
|
||||
}
|
||||
if ( jQuery.fn.css ) {
|
||||
expected += 2;
|
||||
attrObj["css"] = { "paddingLeft": 1, "paddingRight": 1 };
|
||||
@@ -101,12 +105,16 @@ test("jQuery()", function() {
|
||||
elem = jQuery("\n\n<em>world</em>")[0];
|
||||
equal( elem.nodeName.toLowerCase(), "em", "leading newlines" );
|
||||
|
||||
elem = jQuery( "<div/>", attrObj );
|
||||
elem = jQuery("<div/>", attrObj );
|
||||
|
||||
if ( jQuery.fn.width ) {
|
||||
equal( elem[0].style.width, "10px", "jQuery() quick setter width");
|
||||
}
|
||||
|
||||
if ( jQuery.fn.offset ) {
|
||||
equal( elem[0].style.top, "1px", "jQuery() quick setter offset");
|
||||
}
|
||||
|
||||
if ( jQuery.fn.css ) {
|
||||
equal( elem[0].style.paddingLeft, "1px", "jQuery quick setter css");
|
||||
equal( elem[0].style.paddingRight, "1px", "jQuery quick setter css");
|
||||
|
||||
Reference in New Issue
Block a user