exit search screen with Esc key (#2055)
* exit search with esc key feature is added * closing search screen with esc key feature is added to _main.js
This commit is contained in:
parent
8eb880aaa0
commit
1e78b160ca
3 changed files with 12 additions and 2 deletions
|
@ -43,6 +43,16 @@ $(document).ready(function() {
|
|||
$(".author__urls-wrapper button").toggleClass("open");
|
||||
});
|
||||
|
||||
// Close search screen with Esc key
|
||||
$(document).keyup(function(e) {
|
||||
if (e.keyCode === 27) {
|
||||
if ($(".initial-content").hasClass("is--hidden")) {
|
||||
$(".search-content").toggleClass("is--visible");
|
||||
$(".initial-content").toggleClass("is--hidden");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Search toggle
|
||||
$(".search__toggle").on("click", function() {
|
||||
$(".search-content").toggleClass("is--visible");
|
||||
|
|
2
assets/js/main.min.js
vendored
Normal file → Executable file
2
assets/js/main.min.js
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "minimal-mistakes",
|
||||
"version": "4.14.1",
|
||||
"version": "4.15.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in a new issue