Expand search bar when clicked

This commit is contained in:
JC 2016-12-02 19:05:24 +01:00
parent 1a3e23c6ef
commit bcc4c01b39
2 changed files with 6 additions and 2 deletions

View file

@ -16,6 +16,8 @@ function search_fadeIn(){
search_area.css('left', positions.left); search_area.css('left', positions.left);
search_area.css('z-index', 300); search_area.css('z-index', 300);
search_area.css('width', width); search_area.css('width', width);
search_area.find('#q').animate({ height: '50px' });
search_area.find('#search_button').animate({ height: '50px' });
body_dom.append(search_area); body_dom.append(search_area);
$('#mask_search').fadeIn(200); $('#mask_search').fadeIn(200);
@ -46,6 +48,8 @@ function search_fadeOut(){
search_area.css('left', ''); search_area.css('left', '');
search_area.css('z-index', ''); search_area.css('z-index', '');
search_area.css('width', 'auto'); search_area.css('width', 'auto');
search_area.find('#q').css('height', 34);
search_area.find('#search_button').css('height', 34);
$('#search-block').append(search_area); $('#search-block').append(search_area);
search_area.fadeIn(200); search_area.fadeIn(200);

View file

@ -8,9 +8,9 @@
} }
#mask_search{ #mask_search{
background-color: rgba(0,0,0, 0.4);
display: none; display: none;
position: fixed; position: fixed;
background-color: rgba(0, 0, 0, 0.4);
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;