jQuery.fn.offset = function( options ) {
var elem = this[0], box;
- if ( options ) {
+ if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( options ) {
+ if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
return { top: top, left: left };
},
-
+
setOffset: function( elem, options, i ) {
var position = jQuery.css( elem, "position" );
if (options.left != null) {
props.left = (options.left - curOffset.left) + curLeft;
}
-
+
if ( "using" in options ) {
options.using.call( elem, props );
} else {
jQuery.fn[ method ] = function(val) {
var elem = this[0], win;
-
+
if ( !elem ) {
return null;
}