vlcsolutions commited on
Commit
8bcf7d8
·
verified ·
1 Parent(s): 8104f61

Alert Messages: Close (X) button not working, check the code

Browse files
Files changed (1) hide show
  1. index.html +10 -21
index.html CHANGED
@@ -21,13 +21,12 @@
21
  <i data-feather="alert-triangle" class="w-5 h-5 text-red-600 mr-2"></i>
22
  <span class="font-medium text-red-800">Error</span>
23
  </div>
24
-
25
  <!-- CLOSE BUTTON -->
26
- <button type="button"
27
- class="close-alert ml-auto p-2 rounded hover:bg-red-100">
28
- <i data-feather="x" class="w-4 h-4 pointer-events-none"></i>
29
  </button>
30
- </div>
31
 
32
  <div class="p-4 text-red-700">
33
  <p>Could not send an email! Please try again later.</p>
@@ -46,13 +45,12 @@
46
  <i data-feather="check-circle" class="w-5 h-5 text-green-600 mr-2"></i>
47
  <span class="font-medium text-green-800">Success</span>
48
  </div>
49
-
50
  <!-- CLOSE BUTTON -->
51
- <button type="button"
52
- class="close-alert ml-auto p-2 rounded hover:bg-green-100">
53
- <i data-feather="x" class="w-4 h-4 pointer-events-none"></i>
54
  </button>
55
- </div>
56
 
57
  <div class="p-4 text-green-700">
58
  <p>
@@ -402,17 +400,8 @@ document.addEventListener("DOMContentLoaded", function () {
402
  if (params.get("email") === "fail") {
403
  failAlert.classList.remove("hidden");
404
  }
405
-
406
- // Close button logic
407
- document.querySelectorAll(".close-alert").forEach(btn => {
408
- btn.addEventListener("click", () => {
409
- successAlert.classList.add("hidden");
410
- failAlert.classList.add("hidden");
411
- removeQuery();
412
- });
413
- });
414
-
415
- // Feather icons render
416
  if (window.feather) {
417
  feather.replace();
418
  }
 
21
  <i data-feather="alert-triangle" class="w-5 h-5 text-red-600 mr-2"></i>
22
  <span class="font-medium text-red-800">Error</span>
23
  </div>
 
24
  <!-- CLOSE BUTTON -->
25
+ <button type="button" onclick="removeQuery()"
26
+ class="close-alert ml-auto p-2 rounded hover:bg-red-100 focus:outline-none">
27
+ <i data-feather="x" class="w-4 h-4"></i>
28
  </button>
29
+ </div>
30
 
31
  <div class="p-4 text-red-700">
32
  <p>Could not send an email! Please try again later.</p>
 
45
  <i data-feather="check-circle" class="w-5 h-5 text-green-600 mr-2"></i>
46
  <span class="font-medium text-green-800">Success</span>
47
  </div>
 
48
  <!-- CLOSE BUTTON -->
49
+ <button type="button" onclick="removeQuery()"
50
+ class="close-alert ml-auto p-2 rounded hover:bg-green-100 focus:outline-none">
51
+ <i data-feather="x" class="w-4 h-4"></i>
52
  </button>
53
+ </div>
54
 
55
  <div class="p-4 text-green-700">
56
  <p>
 
400
  if (params.get("email") === "fail") {
401
  failAlert.classList.remove("hidden");
402
  }
403
+ // Close button logic - moved to inline onclick handlers
404
+ // Feather icons render
 
 
 
 
 
 
 
 
 
405
  if (window.feather) {
406
  feather.replace();
407
  }