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
791402b4
Commit
791402b4
authored
Apr 10, 2011
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate raf function definition from passing it to requestAnimationFrame
parent
9db18ddd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
effects.js
src/effects.js
+5
-3
sizzle
src/sizzle
+1
-1
No files found.
src/effects.js
View file @
791402b4
...
...
@@ -350,7 +350,8 @@ jQuery.fx.prototype = {
// Start an animation from one number to another
custom
:
function
(
from
,
to
,
unit
)
{
var
self
=
this
,
fx
=
jQuery
.
fx
;
fx
=
jQuery
.
fx
,
raf
;
this
.
startTime
=
jQuery
.
now
();
this
.
start
=
from
;
...
...
@@ -369,13 +370,14 @@ jQuery.fx.prototype = {
// Use requestAnimationFrame instead of setInterval if available
if
(
requestAnimationFrame
)
{
timerId
=
1
;
r
equestAnimationFrame
(
function
raf
()
{
r
af
=
function
()
{
// When timerId gets set to null at any point, this stops
if
(
timerId
)
{
requestAnimationFrame
(
raf
);
fx
.
tick
();
}
});
};
requestAnimationFrame
(
raf
);
}
else
{
timerId
=
setInterval
(
fx
.
tick
,
fx
.
interval
);
}
...
...
sizzle
@
80f2b81d
Subproject commit
f12b9309269ba7e705a99efe099f86ed1fe98d58
Subproject commit
80f2b81d1fbc13d62afb91cb87e1452fbbec1ef4
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