I have the following code to animate the search box. The animation has only effect on the width but not on border. What's the reason?
$('.toggle_search').on('click', function(e) {
e.preventDefault;
$('#keyword').animate({
width: '200px',
borderBottomWidth: "2px",
borderColor: "#000",
borderType: 'solid'
})
});
input {
border:none;
width:0;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form method="get" id="searchform" action="" role="search">
<input type="text" name="keyword" id="keyword" onkeyup="fetch()">
<span class="toggle_search">open</i></span>
</form>