aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authorros3cin <ros3@cin.ufpe.br>2013-04-17 04:06:12 -0300
committerDave Methvin <dave.methvin@gmail.com>2013-04-17 12:37:23 -0400
commit5179fa00b839ebc70ec38fb0cf6cb8f8c412f37e (patch)
treee802c2c03635d8b5fe1d84693063426dac87b847 /src/effects.js
parent039371c741335d02e7e486420f4a96b43ec2d585 (diff)
downloadjquery-5179fa00b839ebc70ec38fb0cf6cb8f8c412f37e.tar.gz
jquery-5179fa00b839ebc70ec38fb0cf6cb8f8c412f37e.zip
Refactor code in effects to use data_priv. Re- Close gh-1244.
Diffstat (limited to 'src/effects.js')
-rw-r--r--src/effects.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/effects.js b/src/effects.js
index a1ba37707..6f8685699 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -304,7 +304,7 @@ function defaultPrefilter( elem, props, opts ) {
// show/hide pass
- dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
+ dataShow = data_priv.get( elem, "fxshow" );
for ( index in props ) {
value = props[ index ];
if ( rfxtypes.exec( value ) ) {
@@ -313,20 +313,19 @@ function defaultPrefilter( elem, props, opts ) {
if ( value === ( hidden ? "hide" : "show" ) ) {
// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
- if( value === "show" && dataShow[ index ] !== undefined ) {
+ if( value === "show" && dataShow !== undefined && dataShow[ index ] !== undefined ) {
hidden = true;
} else {
- continue;
- }
+ continue;
+ }
}
handled.push( index );
}
}
length = handled.length;
- if ( !length ) {
+ if ( length ) {
dataShow = data_priv.get( elem, "fxshow" ) || data_priv.access( elem, "fxshow", {} );
- } else {
if ( "hidden" in dataShow ) {
hidden = dataShow.hidden;
}