aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-08 17:44:59 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-08 17:44:59 -0400
commit3cf2b7c45facd0e01edbaeec74082382f1da1499 (patch)
tree47c7998a7f78a96d9c3a7b71a48da570ef80716f /ui
parentb676d5956137d8bc35087e3160813a025be436d0 (diff)
downloadjquery-ui-3cf2b7c45facd0e01edbaeec74082382f1da1499.tar.gz
jquery-ui-3cf2b7c45facd0e01edbaeec74082382f1da1499.zip
Position: Patch .offset( fn ) setter for jQuery 1.3.2. Fixes #8254 - Position module throws uncaught exception on IE8 with jQuery 1.3.2.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.position.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 2d0f5488d..25d9ce8a4 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -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 );
});