我需要隐藏 div 直到 Vimeo 视频完成。我该怎么做?
我的网站有一个 Vimeo 视频,客户想要隐藏一个包含表单链接的 div,直到视频结束。我在 Vimeo API Playground 上看到有一个“Finish”事件侦听器,但我以前从未弄乱过 Vimeo。我有一个 jquery 调用来隐藏或显示 Div,一旦声明 Vimeo finish 事件,我将运行该 Div。但是我如何设置 JQuery/Javascript 来监听该事件呢?
抱歉,我确信这很简单,但我是 Vimeo 新手。我目前将 Vimeo 视频作为 div 中的 iframe 硬编码到 HTML 中。
感谢您提供的任何示例。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 http://vimeo.com/api/docs/downloads 下载 froogaloop 框架。在您的页面中缩小 javascript 库,并将完成事件与您的播放器挂钩,并在“完成”事件处理程序中运行 jQuery 显示/隐藏代码。
请参阅此处的示例
http://player.vimeo.com/playground
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