How to play/start youtube video after clicking on an image?

后端 未结 5 1443
旧巷少年郎
旧巷少年郎 2020-12-30 03:02

I have an image and I want to start a youtube video only after I click the image. How can I do this?

Thanks a lot!

5条回答
  •  一整个雨季
    2020-12-30 03:54

    I think this will help you. Working fine for me.

    $('.trigger').on('click', function () {
        $(".video")[0].src += "1";
    });
    Click
            
    

提交回复
热议问题