File tree 2 files changed +2
-10
lines changed
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ jQuery.offset = {
32
32
elem . style . position = "relative" ;
33
33
}
34
34
35
- curOffset = curElem . offset ( ) || { top : 0 , left : 0 } ;
35
+ curOffset = curElem . offset ( ) ;
36
36
curCSSTop = jQuery . css ( elem , "top" ) ;
37
37
curCSSLeft = jQuery . css ( elem , "left" ) ;
38
38
calculatePosition = ( position === "absolute" || position === "fixed" ) &&
Original file line number Diff line number Diff line change @@ -36,10 +36,6 @@ test("jQuery()", function() {
36
36
expected ++ ;
37
37
attrObj [ "width" ] = 10 ;
38
38
}
39
- if ( jQuery . fn . offset ) {
40
- expected ++ ;
41
- attrObj [ "offset" ] = { "top" : 1 , "left" : 1 } ;
42
- }
43
39
if ( jQuery . fn . css ) {
44
40
expected += 2 ;
45
41
attrObj [ "css" ] = { "paddingLeft" : 1 , "paddingRight" : 1 } ;
@@ -105,16 +101,12 @@ test("jQuery()", function() {
105
101
elem = jQuery ( "\n\n<em>world</em>" ) [ 0 ] ;
106
102
equal ( elem . nodeName . toLowerCase ( ) , "em" , "leading newlines" ) ;
107
103
108
- elem = jQuery ( "<div/>" , attrObj ) ;
104
+ elem = jQuery ( "<div/>" , attrObj ) ;
109
105
110
106
if ( jQuery . fn . width ) {
111
107
equal ( elem [ 0 ] . style . width , "10px" , "jQuery() quick setter width" ) ;
112
108
}
113
109
114
- if ( jQuery . fn . offset ) {
115
- equal ( elem [ 0 ] . style . top , "1px" , "jQuery() quick setter offset" ) ;
116
- }
117
-
118
110
if ( jQuery . fn . css ) {
119
111
equal ( elem [ 0 ] . style . paddingLeft , "1px" , "jQuery quick setter css" ) ;
120
112
equal ( elem [ 0 ] . style . paddingRight , "1px" , "jQuery quick setter css" ) ;
You can’t perform that action at this time.
0 commit comments