I need script that opens a popup window, like lightbox. but not with image
It must load video player code, from html file, and send video file ID to this code
Player code in html:
<iframe src=" file ID" style="width: 800px; height: 450px; border: none; background-color: #000;" frameborder="0"></iframe>
So i need script to open popup window with code above.
Thanks!
I need script that opens a popup window, like lightbox. but not with image
It must load video player code, from html file, and send video file ID to this code
Player code in html:
<iframe src="http://site./embed/video file ID" style="width: 800px; height: 450px; border: none; background-color: #000;" frameborder="0"></iframe>
So i need script to open popup window with code above.
Thanks!
Share Improve this question edited Jan 20, 2013 at 17:43 Paul Fleming 24.5k8 gold badges78 silver badges113 bronze badges asked Jan 19, 2013 at 12:54 GodfazzerGodfazzer 111 gold badge1 silver badge2 bronze badges 1- Do you need a script or do you need help writing a script? – Blender Commented Jan 19, 2013 at 12:55
2 Answers
Reset to default 2Fancybox does this really well. Version one is free to use.
Html:
<a class="forpopup" href="http://www.example?iframe">This goes to iframe</a>
JS:
$('a.forpopup').fancybox();
See in jQuery ColorBox, in Demos Page find the Other Content Types section for outside HTML content via AJAX, Flash and video examples.
A brief example of usage:
// Format:
$(selector).colorbox({key:value, key:value, key:value});
// Examples:
// Image links displayed as a group
$('a.gallery').colorbox({rel:'gal'});
// Ajax
$('a#login').colorbox();
// Called directly, without assignment to an element:
$.colorbox({href:"thankyou.html"});
// Called directly with HTML
$.colorbox({html:"<h1>Wele</h1>"});
// ColorBox can accept a function in place of a static value:
$("a.gallery").colorbox({rel: 'gal', title: function(){
var url = $(this).attr('href');
return '<a href="' + url + '" target="_blank">Open In New Window</a>';
}});