Skip to content

Commit 2e8ed18

Browse files
committed
fix: the modalbox wasn't able to be closed.
1 parent 9fd21f6 commit 2e8ed18

2 files changed

Lines changed: 5 additions & 31 deletions

File tree

js/app.js

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
var globalData = {
22

3-
is_ES6: true,
4-
53
modalbox_size: `${Math.round($(window).width() - 8)}px`,
64

75
starting_width: $(document).width(),
86

9-
tol_resize: 15
7+
tol_resize: 10
108

119
};
1210

@@ -135,24 +133,6 @@ function mobileAboutBox(windowSize) {
135133

136134
}
137135

138-
function mobileES6WarningBox(windowSize) {
139-
140-
if ($(window).width() <= 768 && globalData.is_ES6 === false) {
141-
142-
$("#modalbox-warning").css({
143-
144-
"marginLeft": "unset",
145-
146-
"left": "unset",
147-
148-
"width": windowSize
149-
150-
});
151-
152-
}
153-
154-
}
155-
156136
// Merci: https://stackoverflow.com/questions/48002147/how-to-activate-and-disable-jquery-click-events-on-an-html-element
157137
$('#display-mobile-menu').on('click', function () {
158138

@@ -192,16 +172,10 @@ $('#display-mobile-menu').on('click', function () {
192172

193173
$(document).ready(function () {
194174

195-
mobileAboutBox(globalData.modalbox_size);
196-
197-
mobileES6WarningBox(globalData.modalbox_size);
175+
$("#notes-btn-id").on("click", openAboutBox);
198176

199-
$('#modalbox-notes').remove();
177+
$(document).on('click', '#close-notes-btn, .overlay', () => { $('#modalbox-notes, .overlay').hide(); });
200178

201-
$('.overlay').css('display', 'none');
179+
$("#copyright").html(new Date().getFullYear());
202180

203181
});
204-
205-
$("#notes-btn-id").on("click", openAboutBox);
206-
207-
$("#copyright").html(new Date().getFullYear());

online/meteorites-map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@
401401

402402
starting_width: $(document).width(),
403403

404-
tol_resize: 15
404+
tol_resize: 10
405405

406406
};
407407

0 commit comments

Comments
 (0)