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
15026215
Commit
15026215
authored
Jan 05, 2007
by
Stefan Petre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the default easing function
parent
04b51d35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
fx.js
src/fx/fx.js
+5
-11
No files found.
src/fx/fx.js
View file @
15026215
...
@@ -498,11 +498,11 @@ jQuery.extend({
...
@@ -498,11 +498,11 @@ jQuery.extend({
var
n
=
t
-
this
.
startTime
;
var
n
=
t
-
this
.
startTime
;
// Figure out where in the animation we are and set the number
// Figure out where in the animation we are and set the number
var
p
=
n
/
z
.
o
.
duration
;
var
p
=
n
/
z
.
o
.
duration
;
//if the easing
exists the
use it else use default linear easing
//if the easing
function exists then
use it else use default linear easing
if
(
jQuery
.
easing
[
z
.
o
.
easing
])
if
(
jQuery
.
easing
[
z
.
o
.
easing
])
z
.
now
=
jQuery
.
easing
[
z
.
o
.
easing
](
p
,
n
,
firstNum
,
(
lastNum
-
firstNum
),
z
.
o
.
duration
);
z
.
now
=
jQuery
.
easing
[
z
.
o
.
easing
](
p
,
n
,
firstNum
,
(
lastNum
-
firstNum
),
z
.
o
.
duration
);
else
else
z
.
now
=
jQuery
.
easingLinear
(
p
,
n
,
firstNum
,
(
lastNum
-
firstNum
),
z
.
o
.
duration
)
;
z
.
now
=
((
-
Math
.
cos
(
p
*
Math
.
PI
)
/
2
)
+
0.5
)
*
(
lastNum
-
firstNum
)
+
firstNum
;
// Perform the next step of the animation
// Perform the next step of the animation
z
.
a
();
z
.
a
();
...
@@ -511,11 +511,6 @@ jQuery.extend({
...
@@ -511,11 +511,6 @@ jQuery.extend({
},
},
easingLinear
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
var
nm
,
m
,
a
,
s
;
return
((
-
Math
.
cos
(
p
*
Math
.
PI
)
/
2
)
+
0.5
)
*
delta
+
firstNum
;
},
/**
/**
*
*
* @param Integer p period step in animation
* @param Integer p period step in animation
...
@@ -526,7 +521,6 @@ jQuery.extend({
...
@@ -526,7 +521,6 @@ jQuery.extend({
*/
*/
easing
:
{
easing
:
{
linear
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
linear
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
var
nm
,
m
,
a
,
s
;
return
((
-
Math
.
cos
(
p
*
Math
.
PI
)
/
2
)
+
0.5
)
*
delta
+
firstNum
;
return
((
-
Math
.
cos
(
p
*
Math
.
PI
)
/
2
)
+
0.5
)
*
delta
+
firstNum
;
},
},
...
@@ -571,7 +565,7 @@ jQuery.extend({
...
@@ -571,7 +565,7 @@ jQuery.extend({
},
},
elasticin
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
elasticin
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
var
nm
,
m
,
a
,
s
;
var
a
,
s
;
if
(
n
==
0
)
if
(
n
==
0
)
return
firstNum
;
return
firstNum
;
if
((
n
/=
duration
)
==
1
)
if
((
n
/=
duration
)
==
1
)
...
@@ -588,7 +582,7 @@ jQuery.extend({
...
@@ -588,7 +582,7 @@ jQuery.extend({
},
},
elasticout
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
elasticout
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
var
nm
,
m
,
a
,
s
;
var
a
,
s
;
if
(
n
==
0
)
if
(
n
==
0
)
return
firstNum
;
return
firstNum
;
if
((
n
/=
duration
/
2
)
==
2
)
if
((
n
/=
duration
/
2
)
==
2
)
...
@@ -605,7 +599,7 @@ jQuery.extend({
...
@@ -605,7 +599,7 @@ jQuery.extend({
},
},
elasticboth
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
elasticboth
:
function
(
p
,
n
,
firstNum
,
delta
,
duration
)
{
var
nm
,
m
,
a
,
s
;
var
a
,
s
;
if
(
n
==
0
)
if
(
n
==
0
)
return
firstNum
;
return
firstNum
;
if
((
n
/=
duration
/
2
)
==
2
)
if
((
n
/=
duration
/
2
)
==
2
)
...
...
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