如何在等离子体简单模态插件中嵌入YouTube视频而不是vimeo视频



包含 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>'
        });
  })
也许将

iframe的"src"属性更改为您想要的YouTube视频?我不熟悉简单模式插件,但就在我头顶上,这听起来是正确的。

$("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>'
        });
  })

相关内容

  • 没有找到相关文章

最新更新