flask_photo_scaling_app/js/photo_app.js

26 lines
840 B
JavaScript
Raw Normal View History

2021-01-08 14:22:28 -08:00
const hamburgerToggle = (toggle) => {
const hamburger = document.getElementById('hamburger');
const hamburgerClose = document.getElementById('hamburgerClose');
const navbarContainer = document.getElementById('navbarContainer');
if (toggle === 1) {
hamburger.style.display = "none";
hamburgerClose.style.display = "block";
navbarContainer.style.display = "flex";
} else {
hamburger.style.display = "flex";
hamburgerClose.style.display = "none";
navbarContainer.style.display = "none";
}
};
const activateHotKeys = () => {
document.addEventListener('keydown', function(event){
if (event.keyCode === 39) {
document.getElementById("nextPhoto").click();
} else if (event.keyCode === 37) {
document.getElementById("previousPhoto").click();
}
console.log(event.keyCode);
});
};