mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-13 16:45:14 +01:00
faster search init
This commit is contained in:
parent
1b3bd0a126
commit
4ff9933102
@ -34,4 +34,4 @@ var Menu = {
|
||||
e.stopPropagation();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ gpuacceleration()
|
||||
transform: none
|
||||
|
||||
.slideDown
|
||||
animation: slideDown .25s both
|
||||
animation: slideDown .2s both
|
||||
|
||||
// Up
|
||||
@keyframes bounceOutUp
|
||||
|
@ -5,6 +5,7 @@
|
||||
//
|
||||
|
||||
&.search-open-blur
|
||||
transition: .2s ease-out
|
||||
filter: blur(10px)
|
||||
user-select: none
|
||||
pointer-events: none
|
||||
|
Loading…
Reference in New Issue
Block a user