Skip to content

Commit 6a5eb35

Browse files
committed
Position: Drop offset-as-a-setter from position, 1.9 won't support core
1.3 anymore
1 parent b65583a commit 6a5eb35

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

ui/jquery.ui.position.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -213,39 +213,4 @@ $.ui.position = {
213213
}
214214
};
215215

216-
// offset setter from jQuery 1.4
217-
if ( !$.offset.setOffset ) {
218-
$.offset.setOffset = function( elem, options ) {
219-
// set position first, in-case top/left are set even on static elem
220-
if ( /static/.test( $.curCSS( elem, "position" ) ) ) {
221-
elem.style.position = "relative";
222-
}
223-
var curElem = $( elem ),
224-
curOffset = curElem.offset(),
225-
curTop = parseInt( $.curCSS( elem, "top", true ), 10 ) || 0,
226-
curLeft = parseInt( $.curCSS( elem, "left", true ), 10) || 0,
227-
props = {
228-
top: (options.top - curOffset.top) + curTop,
229-
left: (options.left - curOffset.left) + curLeft
230-
};
231-
232-
if ( 'using' in options ) {
233-
options.using.call( elem, props );
234-
} else {
235-
curElem.css( props );
236-
}
237-
};
238-
239-
$.fn.offset = function( options ) {
240-
var elem = this[ 0 ];
241-
if ( !elem || !elem.ownerDocument ) { return null; }
242-
if ( options ) {
243-
return this.each(function() {
244-
$.offset.setOffset( this, options );
245-
});
246-
}
247-
return _offset.call( this );
248-
};
249-
}
250-
251216
}( jQuery ));

0 commit comments

Comments
 (0)