Skip to content

Commit 3d32d48

Browse files
Removed onclick calls to js functions in html as they fail to work in firefox.
Have to replace class declaration as it is not recognised by firefox.
1 parent d0ed19a commit 3d32d48

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
</a>
2424
</div>
2525

26-
<div class="navigation__button-open-container" onclick="openNav()">
26+
<div class="navigation__button-open-container">
2727
<div class="navigation__hamburger-bar"></div>
2828
<div class="navigation__hamburger-bar"></div>
2929
<div class="navigation__hamburger-bar"></div>
3030
</div>
3131

3232
<div class="navigation__button-close-container">
33-
<a href="javascript:void(0)" class="navigation__button-close" onclick="closeNav()">
33+
<a href="javascript:void(0)" class="navigation__button-close">
3434
<i class="navigation__button-close fas fa-times"></i>
3535
</a>
3636
</div>

static/js/site.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ var buttonOpenContainer = $(".navigation__button-open-container");
22
var hamburgerBar = $(".navigation__hamburger-bar");
33
var navigationOverlay = $(".navigation__overlay");
44
var buttonCloseContainer = $(".navigation__button-close-container");
5+
var navigationButtonClose = $(".navigation__button-close");
6+
57

68
function openNav() {
79
buttonOpenContainer.css("pointer-events", "none");
@@ -23,6 +25,8 @@ function showCloseButton() {
2325
buttonCloseContainer.css("display", "inline");
2426
}
2527

28+
buttonOpenContainer.on("click", openNav);
29+
navigationButtonClose.on("click", closeNav);
2630

2731
// Responsive background image constructor.
2832
class ResponsiveBackgroundImage {

0 commit comments

Comments
 (0)