Change transform-origin with JavaScript

Click the "Try it" button to set the origin of the rotation to 0 for both the x-axis and the y-axis:

Note: The grey DIV element indicates where the DIV2 element would be without the transformation.

DIV1
DIV2
DIV2