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