This commit is contained in:
iFargle
2023-03-21 19:40:36 +09:00
parent 4315c7d55f
commit 869817a501
2 changed files with 5 additions and 16 deletions

View File

@@ -64,7 +64,6 @@ li.dropdown-oidc-collection{
}
.navfix {
position:relative;
margin-right: 0;
}
.navfix2 {
@@ -73,5 +72,5 @@ li.dropdown-oidc-collection{
}
nav form {
width: 64px;
width: 54px;
}

View File

@@ -5,41 +5,31 @@ $(document).ready(function() {
var trig = 1;
//fix for chrome
$("#search").addClass('searchbarfix');
//animate searchbar width increase to +150%
$('#search').click(function(e) {
//handle other nav elements visibility here to avoid push down
$('.search-hide').addClass('hide');
if (trig == 1){
$('#navfix2').animate({
width: '+=150',
width: '+=210',
marginRight: 0
}, 400);
}, 200);
trig ++;
}
});
// if user leaves the form the width will go back to original state
$("#search").focusout(function() {
$('#navfix2').animate({
width: '-=150'
}, 400);
width: '-=210'
}, 200);
trig = trig - 1;
//handle other nav elements visibility first to avoid push down
$('.search-hide').removeClass('hide');
});
});
//-----------------------------------------------------------
// General Helpers
//-----------------------------------------------------------