aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2015-03-30 19:19:15 +0200
committerTimmy Willison <timmywillisn@gmail.com>2015-04-13 11:41:57 -0400
commitbb4d888f4f7886371347b59eae5d4e6135acb7ed (patch)
treeb29be820cfe4fc0a1d31ebf8b24ecf08bdbea51d /src/css.js
parent3a0dd5a3d3a23e81dfb32af2871fab6be4619434 (diff)
downloadjquery-bb4d888f4f7886371347b59eae5d4e6135acb7ed.tar.gz
jquery-bb4d888f4f7886371347b59eae5d4e6135acb7ed.zip
CSS: Don't expose jQuery.swap
jQuery.swap was an undocumented API used only internally. With the modular AMD system we currently have it's not necessary to expose this function publicly under the jQuery object. Fixes gh-2058 Closes gh-2182
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/css.js b/src/css.js
index 497b0ec53..286eef64b 100644
--- a/src/css.js
+++ b/src/css.js
@@ -8,6 +8,7 @@ define([
"./css/var/cssExpand",
"./css/var/isHidden",
"./css/var/getStyles",
+ "./css/var/swap",
"./css/curCSS",
"./css/adjustCSS",
"./css/defaultDisplay",
@@ -16,11 +17,10 @@ define([
"./data/var/dataPriv",
"./core/init",
- "./css/swap",
"./core/ready",
"./selector" // contains
], function( jQuery, pnum, access, rmargin, rcssNum, rnumnonpx, cssExpand, isHidden,
- getStyles, curCSS, adjustCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
+ getStyles, swap, curCSS, adjustCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
var
// Swappable if display is none or starts with table
@@ -359,7 +359,7 @@ jQuery.each([ "height", "width" ], function( i, name ) {
// but it must have a current display style that would benefit
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
elem.offsetWidth === 0 ?
- jQuery.swap( elem, cssShow, function() {
+ swap( elem, cssShow, function() {
return getWidthOrHeight( elem, name, extra );
}) :
getWidthOrHeight( elem, name, extra );
@@ -385,7 +385,7 @@ jQuery.each([ "height", "width" ], function( i, name ) {
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
function( elem, computed ) {
if ( computed ) {
- return jQuery.swap( elem, { "display": "inline-block" },
+ return swap( elem, { "display": "inline-block" },
curCSS, [ elem, "marginRight" ] );
}
}