1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-23 10:27:20 +01:00

faster search init

This commit is contained in:
Matthias Kretschmann 2015-11-19 16:07:27 +01:00
parent 1b3bd0a126
commit 4ff9933102
4 changed files with 11 additions and 5 deletions

View File

@ -34,4 +34,4 @@ var Menu = {
e.stopPropagation();
});
}
}
};

View File

@ -32,7 +32,9 @@ var Search = {
s.searchfield.focus();
// blur the content
s.content.addClass('search-open-blur');
s.searcharea.on('animationend webkitAnimationEnd oAnimationEnd', function(){
s.content.addClass('search-open-blur');
});
// hide menu too just in case
if ($('body').hasClass('menu-open')) {
@ -86,6 +88,9 @@ var Search = {
// revert all search elements
s.searcharea.removeClass('slideDown').addClass('bounceOutUp');
s.searchpop.addClass('hide');
s.content.removeClass('search-open-blur');
s.searcharea.on('animationend webkitAnimationEnd oAnimationEnd', function(){
s.content.removeClass('search-open-blur');
});
}
}
};

View File

@ -63,7 +63,7 @@ gpuacceleration()
transform: none
.slideDown
animation: slideDown .25s both
animation: slideDown .2s both
// Up
@keyframes bounceOutUp

View File

@ -5,6 +5,7 @@
//
&.search-open-blur
transition: .2s ease-out
filter: blur(10px)
user-select: none
pointer-events: none