context.clearRect(0,0,width, height)
- all you need =)
Keep in mind that you can use CSS styles on a canvas object.
canvas.style.position = "absolute"; canvas.style.left = the x position of the div you're going over +"px"; canvas.style.top = the y position of the div you're going over + "px";
Warty
source share