I need to hide a div until Vimeo video is finished. How do I do that?

心已入冬 提交于 2020-01-01 19:06:04

问题


I have site that has a Vimeo video where the client wants to hide a div, which contains a form link, until the video has finished. I saw on the Vimeo API Playground that there is a "Finish" event listener, but I have never messed with Vimeo before. I have a jquery call to hide or show the Div which I would run once the Vimeo finish event is declared. But how do I setup JQuery/Javascript to listen for that event?

Sorry, I am sure this is simple but I am a Vimeo novice. I currently have the Vimeo video hard coded into the HTML as an iframe within a div.

Thanks for any examples you can provide.


回答1:


Download the froogaloop framework from http://vimeo.com/api/docs/downloads.Include the minified javascript library in your page and hook the finish events with you player and run the jQuery show/hide code inside the 'finish' event handler.

See an example here http://player.vimeo.com/playground



来源:https://stackoverflow.com/questions/7911019/i-need-to-hide-a-div-until-vimeo-video-is-finished-how-do-i-do-that

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!