-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
35 lines (29 loc) · 793 Bytes
/
main.js
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
31
32
33
34
35
$(document).ready(function() {
$(function() {
$("#letter1, #letter2, #letter3, #letter4, #letter5").draggable();
});
$("#ripple").ripples({
resolution: 512,
dropRadius: 30, //px
perturbance: 0.01
});
// $('.bg-1').ripples({
// resolution: 512,
// dropRadius: 20,
// perturbance: 0.04,
// });
var text = document.getElementById("text");
var newDom = "";
var animationDelay = 6;
for (let i = 0; i < text.innerText.length; i++) {
newDom +=
'<span class="char">' +
(text.innerText[i] == " " ? " " : text.innerText[i]) +
"</span>";
}
text.innerHTML = newDom;
var length = text.children.length;
for (let i = 0; i < length; i++) {
text.children[i].style["animation-delay"] = animationDelay * i + "ms";
}
});