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.
Add a class to body when play is pressed on a Vimeo embed
-
11-10-2022 - |
문제
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 :)
해결책
다른 팁
Try this with jQuery!
http://api.jquery.com/addclass/
If you have trouble with implementing comment this answer!
제휴하지 않습니다 StackOverflow