git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reorders condition at L65 for efficiency
[jquery.git]
/
src
/
effects.js
diff --git
a/src/effects.js
b/src/effects.js
index
51ce0c5
..
feaf02b
100644
(file)
--- a/
src/effects.js
+++ b/
src/effects.js
@@
-61,10
+61,10
@@
jQuery.fn.extend({
} else {
for ( var i = 0, j = this.length; i < j; i++ ) {
var display = jQuery.css( this[i], "display" );
} else {
for ( var i = 0, j = this.length; i < j; i++ ) {
var display = jQuery.css( this[i], "display" );
-
- if ( display !== "none" ) {
- jQuery.data( this[i], "olddisplay", display );
- }
+
+ if ( display !== "none" && !jQuery.data( this[i], "olddisplay" ) ) {
+ jQuery.data( this[i], "olddisplay", display );
+ }
}
// Set the display of the elements in a second loop
}
// Set the display of the elements in a second loop