Skip to content

Commit

Permalink
Position: Patch .offset( fn ) setter for jQuery 1.3.2. Fixes #8254 - …
Browse files Browse the repository at this point in the history
…Position module throws uncaught exception on IE8 with jQuery 1.3.2.
  • Loading branch information
scottgonzalez committed May 8, 2012
1 parent b676d59 commit 3cf2b7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/jquery.ui.position.js
Expand Up @@ -243,7 +243,12 @@ if ( !$.offset.setOffset ) {
$.fn.offset = function( options ) {
var elem = this[ 0 ];
if ( !elem || !elem.ownerDocument ) { return null; }
if ( options ) {
if ( options ) {
if ( $.isFunction( options ) ) {
return this.each(function( i ) {
$( this ).offset( options.call( this, i, $( this ).offset() ) );
});
}
return this.each(function() {
$.offset.setOffset( this, options );
});
Expand Down

0 comments on commit 3cf2b7c

Please sign in to comment.