<style type="text/css">
body{
margin:0;
}
#progress{
height:2px;
background:#b91f1f;
-webkit-transition:opacity 1s linear;
}
#progress.done{
opacity:0;
}
</style>
<script type="text/javascript">
$({property:0}).animate({property:100},{
duration:3000,
step:function(){
var percentage = Math.round(this.property);
$("#progress").css('width',percentage + '%');
if(percentage == 100){
$("#progress").addClass("done");
}
}
});
</script>
body{
margin:0;
}
#progress{
height:2px;
background:#b91f1f;
-webkit-transition:opacity 1s linear;
}
#progress.done{
opacity:0;
}
</style>
<script type="text/javascript">
$({property:0}).animate({property:100},{
duration:3000,
step:function(){
var percentage = Math.round(this.property);
$("#progress").css('width',percentage + '%');
if(percentage == 100){
$("#progress").addClass("done");
}
}
});
</script>