Close modal with ESC

$('html').keyup(function(e){ if(e.key === 'Escape') { $('.modal').remove(); } });
Close modal with ESC in ES5

1 Response

Instead of

you can use

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.