Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
48
rated 0 times [  52] [ 4]  / answers: 1 / hits: 60713  / 13 Years ago, tue, september 13, 2011, 12:00:00

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!


More From » jquery

 Answers
44

Have a look at:



Youtube API examples



the code will be something like this:



function onPlayerReady(event) {
$('img').click(function() {
ytPlayer.playVideo();
});
}

[#90118] Monday, September 12, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zaynerogerb

Total Points: 454
Total Questions: 109
Total Answers: 97

Location: Comoros
Member since Tue, Mar 14, 2023
1 Year ago
zaynerogerb questions
;