Javascript with seamless play

Trying to get javascript work with seamless play. What Im missing? It shoud change the button color to pink . This works without sp. Can anyone help me with attached title. This is done with 17.1.3.

Thanks

Preview image

Tags: