If I'm correct in understanding your query, you're looking to animate the border width of an element, possibly the border-top-width. However, simply increasing the border width may not achieve the desired effect of filling the element. One workaround is to animate a nested element that covers the outer element, creating the illusion of filling. Check out the example below for a clearer demonstration.
Here is the corresponding HTML code:
<style>
#mainBorder, #nestedDivs {
display: inline-block;
background-color: #CCC;
height: 0px;
width: 300px;
border-top-color: red;
border-top-style: solid;
border-top-width: 1px;
height: 200px;
vertical-align: top;
}
#nestedDivs{
margin-top: 200px;
position: relative;
}
#innerNestedDiv
{
position: absolute;
top:0px;
height: 0px;
width: 300px;
background-color: red;
}
</style>
<div id="mainBorder"></div>
<div id="nestedDivs">
<div id="innerNestedDiv"></div>
</div>
And the corresponding javascript:
<script type="text/javascript">
$('#mainBorder').animate({borderTopWidth:200},1000)
$('#innerNestedDiv').animate({height:200},1000)
</script>