We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent debc545 commit 2e95cbaCopy full SHA for 2e95cba
008-form wave animation/script.js
@@ -1,11 +1,15 @@
1
const labels = document.querySelectorAll(".form-control label");
2
3
-labels.forEach((label) => {
4
- label.innerHTML = label.innerText
+function createWaveLabel(text) {
+ return text
5
.split("")
6
.map(
7
(letter, idx) =>
8
`<span style="transition-delay:${idx * 50}ms">${letter}</span>`
9
)
10
.join("");
11
+}
12
+
13
+labels.forEach((label) => {
14
+ label.innerHTML = createWaveLabel(label.innerText);
15
});
0 commit comments