Spaces:
Running
Running
BraydenMoore
commited on
Commit
•
4b7c989
1
Parent(s):
4298351
Debug
Browse files- Templates/index.html +8 -12
Templates/index.html
CHANGED
@@ -574,32 +574,28 @@
|
|
574 |
function handleEnter() {
|
575 |
if (divText.textContent !== `(${div.dataset.proba}%)`){
|
576 |
divText.style.opacity = 0;
|
|
|
577 |
setTimeout(() => {
|
578 |
previousValue = divText.textContent;
|
579 |
divText.textContent = `(${div.dataset.proba}%)`;
|
580 |
divText.style.opacity = 1;
|
581 |
}, 300);
|
582 |
-
}
|
583 |
|
584 |
-
}
|
585 |
-
|
586 |
-
function handleLeave() {
|
587 |
-
if (previousValue !== undefined) {
|
588 |
-
divText.style.opacity = 0;
|
589 |
setTimeout(() => {
|
590 |
-
divText.
|
591 |
-
|
592 |
-
|
|
|
|
|
|
|
593 |
}
|
|
|
594 |
}
|
595 |
|
596 |
// For desktop
|
597 |
div.addEventListener('mouseenter', handleEnter);
|
598 |
-
div.addEventListener('mouseleave', handleLeave);
|
599 |
-
|
600 |
// For mobile
|
601 |
div.addEventListener('touchstart', handleEnter);
|
602 |
-
div.addEventListener('touchend', handleLeave);
|
603 |
}
|
604 |
|
605 |
// Populate dropdown
|
|
|
574 |
function handleEnter() {
|
575 |
if (divText.textContent !== `(${div.dataset.proba}%)`){
|
576 |
divText.style.opacity = 0;
|
577 |
+
|
578 |
setTimeout(() => {
|
579 |
previousValue = divText.textContent;
|
580 |
divText.textContent = `(${div.dataset.proba}%)`;
|
581 |
divText.style.opacity = 1;
|
582 |
}, 300);
|
|
|
583 |
|
|
|
|
|
|
|
|
|
|
|
584 |
setTimeout(() => {
|
585 |
+
divText.style.opacity = 0;
|
586 |
+
setTimeout(() => {
|
587 |
+
divText.textContent = previousValue;
|
588 |
+
divText.style.opacity = 1;
|
589 |
+
}, 300);
|
590 |
+
}, 1000);
|
591 |
}
|
592 |
+
|
593 |
}
|
594 |
|
595 |
// For desktop
|
596 |
div.addEventListener('mouseenter', handleEnter);
|
|
|
|
|
597 |
// For mobile
|
598 |
div.addEventListener('touchstart', handleEnter);
|
|
|
599 |
}
|
600 |
|
601 |
// Populate dropdown
|