forked from jquerytools/www
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheasing.htm
More file actions
35 lines (24 loc) · 753 Bytes
/
easing.htm
File metadata and controls
35 lines (24 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<%-- :mode=jsp: --%>
<%@ include file="../standalone.jsf" %>
<link rel="stylesheet" type="text/css" href="${cdn}${jqt}/css/scrollable-horizontal.css" />
<link rel="stylesheet" type="text/css" href="${cdn}${jqt}/css/scrollable-buttons.css" />
</head>
<body>
<%@ include file="scrollable.jsf" %>
<!-- javascript coding -->
<script>
<c:set var="easing">
// custom easing called "custom"
$.easing.custom = function (x, t, b, c, d) {
var s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}
</c:set>
${easing}
<c:set var="js">
// use the custom easing
$("div.scrollable").scrollable({easing: 'custom', speed: 700, circular: true});
</c:set>
${js}
</script>