包含 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&byline=0&portrait=0&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&byline=0&portrait=0&color=824571" width="680" height="382" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>'
});
})