]> source.dussan.org Git - jquery-ui.git/commitdiff
Use jQuery.css() instead of deprecated jQuery.curCSS().
authorScott González <scott.gonzalez@gmail.com>
Sun, 12 Feb 2012 14:01:06 +0000 (09:01 -0500)
committerScott González <scott.gonzalez@gmail.com>
Sun, 12 Feb 2012 14:01:06 +0000 (09:01 -0500)
ui/jquery.effects.core.js
ui/jquery.ui.core.js
ui/jquery.ui.menu.js
ui/jquery.ui.position.js

index 68ed637e194f5abb925051e700e86e62fe0212bd..b28e4c4ee9f7055080f0741f42f031cae5e9aec0 100644 (file)
@@ -77,7 +77,7 @@ function getColor(elem, attr) {
                var color;
 
                do {
-                               color = $.curCSS(elem, attr);
+                               color = $.css(elem, attr);
 
                                // Keep going until we find an element that has color, or we hit the body
                                if ( color != "" && color !== "transparent" || $.nodeName(elem, "body") )
index d777d6d49845c226c5d52843351639e4726fe882..1c54c993cfcedd17a91abb45838a994d85866e35 100644 (file)
@@ -77,11 +77,11 @@ $.fn.extend({
                var scrollParent;
                if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
                        scrollParent = this.parents().filter(function() {
-                               return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+                               return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
                        }).eq(0);
                } else {
                        scrollParent = this.parents().filter(function() {
-                               return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+                               return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
                        }).eq(0);
                }
 
@@ -141,12 +141,12 @@ $.each( [ "Width", "Height" ], function( i, name ) {
 
        function reduce( elem, size, border, margin ) {
                $.each( side, function() {
-                       size -= parseFloat( $.curCSS( elem, "padding" + this, true ) ) || 0;
+                       size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
                        if ( border ) {
-                               size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true ) ) || 0;
+                               size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
                        }
                        if ( margin ) {
-                               size -= parseFloat( $.curCSS( elem, "margin" + this, true ) ) || 0;
+                               size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
                        }
                });
                return size;
@@ -197,7 +197,7 @@ function focusable( element, isTabIndexNotNaN ) {
 
 function visible( element ) {
        return !$( element ).parents().andSelf().filter(function() {
-               return $.curCSS( this, "visibility" ) === "hidden" ||
+               return $.css( this, "visibility" ) === "hidden" ||
                        $.expr.filters.hidden( this );
        }).length;
 }
index 45be5edcfeb1eaaf204bc3d3a3f431337e67b718..42829c2a14c15849242bbc8c9423b7fd22ff31a0 100644 (file)
@@ -286,8 +286,8 @@ $.widget( "ui.menu", {
                this.blur( event );
 
                if ( this._hasScroll() ) {
-                       var borderTop = parseFloat( $.curCSS( this.activeMenu[0], "borderTopWidth", true ) ) || 0,
-                               paddingTop = parseFloat( $.curCSS( this.activeMenu[0], "paddingTop", true ) ) || 0,
+                       var borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0,
+                               paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0,
                                offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop,
                                scroll = this.activeMenu.scrollTop(),
                                elementHeight = this.activeMenu.height(),
index 00976bf791d09fa740468b58e040d5b8103d4011..119847cec8af28f86d5010b23c852cb0ccfb9f79 100644 (file)
@@ -152,13 +152,13 @@ $.fn.position = function( options ) {
                var elem = $( this ),
                        elemWidth = elem.outerWidth(),
                        elemHeight = elem.outerHeight(),
-                       marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
-                       marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
+                       marginLeft = parseInt( $.css( this, "marginLeft" ) ) || 0,
+                       marginTop = parseInt( $.css( this, "marginTop" ) ) || 0,
                        scrollInfo = $.position.getScrollInfo( within ),
                        collisionWidth = elemWidth + marginLeft +
-                               ( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ) + scrollInfo.width,
+                               ( parseInt( $.css( this, "marginRight" ) ) || 0 ) + scrollInfo.width,
                        collisionHeight = elemHeight + marginTop +
-                               ( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ) + scrollInfo.height,
+                               ( parseInt( $.css( this, "marginBottom" ) ) || 0 ) + scrollInfo.height,
                        position = $.extend( {}, basePosition ),
                        myOffset = [
                                parseInt( offsets.my[ 0 ], 10 ) *