Click on image (splashscreen) to play embedded Youtube Movie
问题 I Was wondering how to make something as followed: I want to have an image that displays a splash image, clicking on that image it will play a youtube Movie in the same placeholder. ( to be clear I don't want to show the embedded player directly but first a clickable image) 回答1: Try something like this: <img src="placeholder.jpg" data-video="http://www.youtube.com/embed/zP_D_YKnwi0"> $('img').click(function(){ var video = '<iframe src="'+ $(this).attr('data-video') +'"></iframe>'; $(this)