Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
3106039a
Commit
3106039a
authored
Nov 07, 2009
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made sure that animate callbacks get executed even when no properties are passed in. Fixes #5459.
parent
b0fe380c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
fx.js
src/fx.js
+5
-1
fx.js
test/unit/fx.js
+12
-0
No files found.
src/fx.js
View file @
3106039a
...
@@ -164,6 +164,10 @@ jQuery.fn.extend({
...
@@ -164,6 +164,10 @@ jQuery.fn.extend({
}
}
});
});
if
(
jQuery
.
isEmptyObject
(
prop
)
)
{
return
optall
.
complete
.
call
(
this
);
}
// For JS strict compliance
// For JS strict compliance
return
true
;
return
true
;
});
});
...
@@ -427,4 +431,4 @@ if ( jQuery.expr && jQuery.expr.filters ) {
...
@@ -427,4 +431,4 @@ if ( jQuery.expr && jQuery.expr.filters ) {
return
elem
===
fn
.
elem
;
return
elem
===
fn
.
elem
;
}).
length
;
}).
length
;
};
};
}
}
\ No newline at end of file
test/unit/fx.js
View file @
3106039a
...
@@ -67,6 +67,18 @@ test("animate option (queue === false)", function () {
...
@@ -67,6 +67,18 @@ test("animate option (queue === false)", function () {
});
});
*/
*/
test
(
"animate with no properties"
,
function
()
{
expect
(
1
);
var
divs
=
jQuery
(
"div"
),
count
=
0
;
divs
.
animate
({},
function
(){
count
++
;
});
equals
(
divs
.
length
,
count
,
"Make sure that callback is called for each element in the set."
);
});
test
(
"animate duration 0"
,
function
()
{
test
(
"animate duration 0"
,
function
()
{
expect
(
7
);
expect
(
7
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment