0

包含 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>'
        });
  })
4

1 回答 1

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>'
        });
  })
于 2013-12-28T06:13:16.317 回答