Alert Messages : (close) icon is not working, check once
Browse files- index.html +16 -9
index.html
CHANGED
|
@@ -17,10 +17,10 @@
|
|
| 17 |
<div class="flex-1">
|
| 18 |
Could not send an email! Please try again later.
|
| 19 |
</div>
|
| 20 |
-
<button
|
| 21 |
<i data-feather="x" class="w-5 h-5"></i>
|
| 22 |
</button>
|
| 23 |
-
|
| 24 |
</div>
|
| 25 |
|
| 26 |
<div id="success_email" class="hidden fixed top-4 right-4 max-w-md bg-green-100 border-l-4 border-green-500 text-green-700 p-4 rounded shadow-lg z-50">
|
|
@@ -29,10 +29,10 @@
|
|
| 29 |
<div class="flex-1">
|
| 30 |
We have sent you an email. Please check your inbox. If you cannot view it in your primary inbox, please check your Spam or Junk folder.
|
| 31 |
</div>
|
| 32 |
-
<button
|
| 33 |
<i data-feather="x" class="w-5 h-5"></i>
|
| 34 |
</button>
|
| 35 |
-
|
| 36 |
</div>
|
| 37 |
<!---Twitter Card data -->
|
| 38 |
<meta name="twitter:card" content="summary_large_image">
|
|
@@ -355,11 +355,12 @@
|
|
| 355 |
});
|
| 356 |
});
|
| 357 |
</script>
|
| 358 |
-
|
| 359 |
document.addEventListener("DOMContentLoaded", function () {
|
| 360 |
-
|
| 361 |
const successAlert = document.getElementById("success_email");
|
| 362 |
const failAlert = document.getElementById("fail_email");
|
|
|
|
|
|
|
| 363 |
|
| 364 |
// Hide both initially
|
| 365 |
successAlert.classList.add("hidden");
|
|
@@ -375,13 +376,19 @@ document.addEventListener("DOMContentLoaded", function () {
|
|
| 375 |
}
|
| 376 |
|
| 377 |
// Close button logic
|
| 378 |
-
|
| 379 |
-
|
| 380 |
successAlert.classList.add("hidden");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
failAlert.classList.add("hidden");
|
| 382 |
removeQuery();
|
| 383 |
});
|
| 384 |
-
}
|
| 385 |
|
| 386 |
// Feather icons render
|
| 387 |
if (window.feather) {
|
|
|
|
| 17 |
<div class="flex-1">
|
| 18 |
Could not send an email! Please try again later.
|
| 19 |
</div>
|
| 20 |
+
<button id="close-fail-alert" class="ml-4 text-red-700 hover:text-red-900">
|
| 21 |
<i data-feather="x" class="w-5 h-5"></i>
|
| 22 |
</button>
|
| 23 |
+
</div>
|
| 24 |
</div>
|
| 25 |
|
| 26 |
<div id="success_email" class="hidden fixed top-4 right-4 max-w-md bg-green-100 border-l-4 border-green-500 text-green-700 p-4 rounded shadow-lg z-50">
|
|
|
|
| 29 |
<div class="flex-1">
|
| 30 |
We have sent you an email. Please check your inbox. If you cannot view it in your primary inbox, please check your Spam or Junk folder.
|
| 31 |
</div>
|
| 32 |
+
<button id="close-success-alert" class="ml-4 text-green-700 hover:text-green-900">
|
| 33 |
<i data-feather="x" class="w-5 h-5"></i>
|
| 34 |
</button>
|
| 35 |
+
</div>
|
| 36 |
</div>
|
| 37 |
<!---Twitter Card data -->
|
| 38 |
<meta name="twitter:card" content="summary_large_image">
|
|
|
|
| 355 |
});
|
| 356 |
});
|
| 357 |
</script>
|
| 358 |
+
<script>
|
| 359 |
document.addEventListener("DOMContentLoaded", function () {
|
|
|
|
| 360 |
const successAlert = document.getElementById("success_email");
|
| 361 |
const failAlert = document.getElementById("fail_email");
|
| 362 |
+
const closeSuccessBtn = document.getElementById("close-success-alert");
|
| 363 |
+
const closeFailBtn = document.getElementById("close-fail-alert");
|
| 364 |
|
| 365 |
// Hide both initially
|
| 366 |
successAlert.classList.add("hidden");
|
|
|
|
| 376 |
}
|
| 377 |
|
| 378 |
// Close button logic
|
| 379 |
+
if (closeSuccessBtn) {
|
| 380 |
+
closeSuccessBtn.addEventListener("click", () => {
|
| 381 |
successAlert.classList.add("hidden");
|
| 382 |
+
removeQuery();
|
| 383 |
+
});
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
if (closeFailBtn) {
|
| 387 |
+
closeFailBtn.addEventListener("click", () => {
|
| 388 |
failAlert.classList.add("hidden");
|
| 389 |
removeQuery();
|
| 390 |
});
|
| 391 |
+
}
|
| 392 |
|
| 393 |
// Feather icons render
|
| 394 |
if (window.feather) {
|