What causes images and div elements to appear jerky when in motion?
<div>*</div>
$(function() {
var fps = 30;
var a = 0;
draw = function() {
a += 0.001;
var x = ((Math.cos(a)+1) /2) *90;
var y = ((Math.sin(a)+1) /2) *90;
$("div").css("left", x + "%");
$("div").css("top", y + "%");
}
update_frame = function(fps) {
draw();
setTimeout(function(){
update_frame(fps)
}, (1000./fps));
}
update_frame(fps);
});