a working example has already been in the demo, but without user-interaction ;). added button for changing button state