How to embed youtube video instead of vimeo video in the plasm simplemodal plugin...?

380 views Asked by At

the jquery code containing the vimeo player is below

$("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

There are 1 answers

2
Josh Beam On BEST ANSWER

Maybe change the 'src' attribute of the iframe to the youtube video you want? I'm not familiar with the simplemodal plugin, but right off the top of my head, that sounds about right.

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