mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-11 06:31:51 +08:00
added a check if the click is inside the popup
This commit is contained in:
parent
ee4b1b5215
commit
da97eb06fb
2 changed files with 16 additions and 12 deletions
|
|
@ -5,10 +5,12 @@ $(document.body).on("click", "#contactPopupButton", () => {
|
|||
.animate({ opacity: 1 }, 125);
|
||||
});
|
||||
|
||||
$(document.body).on("click", "#contactPopupWrapper", () => {
|
||||
$("#contactPopupWrapper")
|
||||
.css("opacity", 1)
|
||||
.animate({ opacity: 0 }, 125, () => {
|
||||
$("#contactPopupWrapper").addClass("hidden");
|
||||
});
|
||||
$(document.body).on("click", "#contactPopupWrapper", (e) => {
|
||||
if ($(e.target).attr("id") === "contactPopupWrapper") {
|
||||
$("#contactPopupWrapper")
|
||||
.css("opacity", 1)
|
||||
.animate({ opacity: 0 }, 125, () => {
|
||||
$("#contactPopupWrapper").addClass("hidden");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,10 +9,12 @@ $(document.body).on("click", ".version", () => {
|
|||
show();
|
||||
});
|
||||
|
||||
$(document.body).on("click", "#versionHistoryWrapper", () => {
|
||||
$("#versionHistoryWrapper")
|
||||
.css("opacity", 1)
|
||||
.animate({ opacity: 0 }, 125, () => {
|
||||
$("#versionHistoryWrapper").addClass("hidden");
|
||||
});
|
||||
$(document.body).on("click", "#versionHistoryWrapper", (e) => {
|
||||
if ($(e.target).attr("id") === "versionHistoryWrapper") {
|
||||
$("#versionHistoryWrapper")
|
||||
.css("opacity", 1)
|
||||
.animate({ opacity: 0 }, 125, () => {
|
||||
$("#versionHistoryWrapper").addClass("hidden");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue