如何在plasm simplemodal插件中嵌入youtube视频而不是vimeo视频...?

时间:2013-12-28 06:10:33

标签: jquery video youtube vimeo video-embedding

包含vimeo播放器的jquery代码位于

之下
$("modal-nofooter").addEvent("click", function(e){
    e.stop();
    var SM = new SimpleModal({"hideFooter":true, "width":710});
        SM.show({
          "title":"Vimeo video",
          "model":"modal",
          "contents":'<iframe src="http://player.vimeo.com/video/26198635?title=0&amp;byline=0&amp;portrait=0&amp;color=824571" width="680" height="382" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>'
        });
  })

1 个答案:

答案 0 :(得分:0)

也许将iframe的'src'属性更改为您想要的youtube视频?我对simplemodal插件并不熟悉,但就在我的脑海中,听起来不错。

$("modal-nofooter").addEvent("click", function(e){
    e.stop();
    var SM = new SimpleModal({"hideFooter":true, "width":710});
        SM.show({
          //You could also probably change the "title" property as well to, say, "Youtube video"
          "title":"Vimeo video",
          "model":"modal",

          /*****      THIS PART HERE, WHERE IS SAYS src   *********/
          "contents":'http://www.youtube.com/embed/abcxyz?title=0&amp;byline=0&amp;portrait=0&amp;color=824571" width="680" height="382" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>'
        });
  })