问题
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