(7 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
$("head").append('<meta name="viewport" content="width=device-width, initial-scale=1">'); | $("head").append('<meta name="viewport" content="width=device-width, initial-scale=1">'); | ||
var showMenu = !1, burger = document.getElementById("burger"); | var showMenu = !1, burger = document.getElementById("burger"); | ||
− | function popup(e | + | function popup(e) { |
$("#" + e).css("display", "block"); | $("#" + e).css("display", "block"); | ||
− | |||
− | |||
− | |||
− | |||
location.hash = "#" + e; | location.hash = "#" + e; | ||
+ | $(document).keyup(function(evt) { | ||
+ | if (evt.keyCode === 27) { | ||
+ | hide(e); | ||
+ | } | ||
+ | }); | ||
} | } | ||
function hide(e) { | function hide(e) { | ||
Line 26: | Line 27: | ||
return; | return; | ||
} | } | ||
− | popup(hash | + | popup(hash) |
} | } | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 20:23, 13 December 2019