test jquery animation start width/height
start width and height of box-sizing: border-box are measured incorrectly during animation
HTML
<div class='testbox' style='box-sizing:content-box;top:20px;left:10px'>content-box</div>
<div class='testbox' style='box-sizing:border-box;top:20px;left:200px'>border-box</div>
<input type='button' id='test' value='test'/>
CSS
.testbox {
position:absolute;
width:50px;height:50px;
border:10px solid red;
padding:10px;
}
JavaScript
function test() {
var size = Math.round(Math.random() * 20 + 60);
$('.testbox').animate({
width: size,
height: size
});
}
test();
$('#test').click(test);