1.5.2. Control by Button - Stop move when onmouseup






If you click a button the red square will start moving. The movement will stop when you stop pressing th button.

We have added the ontouchstart event on the buttons, to make this example work for touch devices.

Nhận xét