doubi7496 2014-08-03 04:22 采纳率: 0%
浏览 298
已采纳

如何在YouTube视频播放完成后显示按钮

I have a popup on my PHP website with auto-playing YouTube video, I've put a button to <kbd>enter the website</kbd> skipping the popup.

But I want the <kbd>enter the website</kbd> button to be visible only after the youtube video ends.

  • 写回答

2条回答 默认 最新

  • dorisdong0514 2014-09-22 10:19
    关注

    If you know the duration of the video, you can use a setTimeout() JavaScript function to show the skip to enter button after that duration.

    $(document).ready(function(){
        setTimeout(function(){
            $(".hidden").removeClass("hidden");
        }, 25000);
    });
    

    Fiddle: http://jsfiddle.net/praveenscience/qufb369v/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?