Skip to content

Commit 7ae50e8

Browse files
committed
fix: prevent error button from showing on successful data load.
1 parent 5be8f1e commit 7ae50e8

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

online/radioactive-decay.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -780,18 +780,18 @@ <h2>Notes:</h2>
780780
setCorrectButtonOnMobile();
781781

782782
}
783+
784+
else {
783785

784-
if ($(window).width() >= 1024) $decayBtn.html('<i class="fa-solid fa-circle-xmark"></i> Une erreur s\'est produite !');
786+
if ($(window).width() >= 1024) $decayBtn.html('<i class="fa-solid fa-circle-xmark"></i> Une erreur s\'est produite !');
787+
788+
else $decayBtn.html('<i class="fa-solid fa-circle-xmark"></i>');
789+
790+
$decayBtn.removeClass('radioactive-decay-btn').addClass('error-btn').prop('disabled', true).attr('aria-disabled', 'true').attr('title', `Impossible d'établir une équation.`);
791+
792+
}
785793

786-
else $decayBtn.html('<i class="fa-solid fa-circle-xmark"></i>');
787-
788-
$decayBtn
789-
.removeClass('radioactive-decay-btn')
790-
.addClass('error-btn')
791-
.prop('disabled', true)
792-
.attr('aria-disabled', 'true')
793-
.attr('title', `Impossible d'établir une équation.`);
794-
});
794+
});
795795

796796
}, 4000);
797797

0 commit comments

Comments
 (0)