문제

I could really use some help on this one. I need to add a class to the body tag when someone presses the play button on a Vimeo embed.

The background on the site is white and when someone presses the play button, a class is added to the body tag so the background fades to black (body class="bgcolor_black"). And when the movie is paused or stops it goes back to the white background (body class="bgcolor_white").

Is this possible? The site is built on Wordpress. I have searched alot but all I can find is about a extra button to "turn the lights off".

Thanks in advance and sorry if the english is bad :)

도움이 되었습니까?

해결책

This cannot be done unless vimeo.com allows your domain to execute cross-domain interaction. It is not allowed for security reasons. This security measure is known as the Same Origin Policy.

다른 팁

Try this with jQuery!

http://api.jquery.com/addclass/

If you have trouble with implementing comment this answer!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top