]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Drop offset-as-a-setter from position, 1.9 won't support core
authorjzaefferer <joern.zaefferer@gmail.com>
Fri, 25 Feb 2011 10:12:21 +0000 (11:12 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Fri, 25 Feb 2011 10:16:16 +0000 (11:16 +0100)
1.3 anymore

ui/jquery.ui.position.js

index 8bdc462dd59086c4b4c6c0f00ef71354e3a38121..6f223b424732fe59ae6f3dd238c46380acb6c900 100644 (file)
@@ -213,39 +213,4 @@ $.ui.position = {
        }
 };
 
-// offset setter from jQuery 1.4
-if ( !$.offset.setOffset ) {
-       $.offset.setOffset = function( elem, options ) {
-               // set position first, in-case top/left are set even on static elem
-               if ( /static/.test( $.curCSS( elem, "position" ) ) ) {
-                       elem.style.position = "relative";
-               }
-               var curElem   = $( elem ),
-                       curOffset = curElem.offset(),
-                       curTop    = parseInt( $.curCSS( elem, "top",  true ), 10 ) || 0,
-                       curLeft   = parseInt( $.curCSS( elem, "left", true ), 10)  || 0,
-                       props     = {
-                               top:  (options.top  - curOffset.top)  + curTop,
-                               left: (options.left - curOffset.left) + curLeft
-                       };
-               
-               if ( 'using' in options ) {
-                       options.using.call( elem, props );
-               } else {
-                       curElem.css( props );
-               }
-       };
-
-       $.fn.offset = function( options ) {
-               var elem = this[ 0 ];
-               if ( !elem || !elem.ownerDocument ) { return null; }
-               if ( options ) { 
-                       return this.each(function() {
-                               $.offset.setOffset( this, options );
-                       });
-               }
-               return _offset.call( this );
-       };
-}
-
 }( jQuery ));