swap image with embedded vimeo video when image is clicked

你说的曾经没有我的故事 提交于 2019-12-25 18:25:56

问题


i've been looking for a solution to this for a while, but i'm no jquery expert.

i currently have an embedded vimeo video on a page. i want the page to load with the video hidden and an image in it's place. when the user clicks the image, the image is hidden and the video begins to play in the same spot.

i saw something on here about doing a similar thing with youtube videos, but i'm not sure if vimeo works the same way or not.

i also tried some jquery methods like replaceWith but they were not working properly.

any help would be really appreciated.


回答1:


Why not load the video into a hidden div along with the rest of the page, and then use .show()?



来源:https://stackoverflow.com/questions/8975987/swap-image-with-embedded-vimeo-video-when-image-is-clicked

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