-1

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.

patricko
  • 831
  • 4
  • 16
  • 34

1 Answers1

0

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

Grim...
  • 16,518
  • 7
  • 45
  • 61
  • So I would just put the embedding code into a div, hide it, then show it when the image is clicked on? – patricko Jan 23 '12 at 17:49
  • i hid the video embedding in a div and changed the image to a link. when you click the image, it hides and the video is shown in it's place. perfect – patricko Jan 23 '12 at 18:00
  • 1
    Does this load video even if if the image is not clicked? Or video is only loaded when the image is clicked? – Krunal Feb 02 '13 at 12:14