Add escape key for modals
This commit is contained in:
parent
1dc6ef2c76
commit
9caa0407c2
2 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
* Split icon container dimensions and icon size
|
||||
* Fix delete button by using pixels instead of (r)em
|
||||
* Fix level on mobile
|
||||
* Add new `.is-spaced` modifer for titles and subtitles
|
||||
|
||||
## 0.3.2
|
||||
|
||||
|
|
|
@ -24,6 +24,13 @@ jQuery(document).ready(function ($) {
|
|||
$('#modal-ter').removeClass('is-active');
|
||||
});
|
||||
|
||||
$(document).on('keyup',function(e) {
|
||||
if (e.keyCode == 27) {
|
||||
$('html').removeClass('is-clipped');
|
||||
$('.modal').removeClass('is-active');
|
||||
}
|
||||
});
|
||||
|
||||
var $highlights = $('.highlight');
|
||||
|
||||
$highlights.each(function() {
|
||||
|
|
Loading…
Add table
Reference in a new issue