mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-10 07:19:44 +00:00
Close project modals when pressing esc
This commit is contained in:
parent
db4f7e5d7a
commit
ae90b40388
1 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,11 @@
|
|||
$('#close-{{ $index }}').click(function () {
|
||||
$('#modal-{{ $index }}').removeClass('is-active');
|
||||
});
|
||||
$(document).keypress(function(e) {
|
||||
if(e.which == 0) {
|
||||
$('#modal-{{ $index }}').removeClass('is-active');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{{ end }} {{ end }}
|
||||
{{ partial "top-icon.html" . }}
|
||||
|
|
Loading…
Reference in a new issue