admin管理员组文章数量:1321043
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>';
}});
本文标签: javascriptajaxjqueryScript that open simple popup windowStack Overflow
版权声明:本文标题:javascript - ajaxjquery - Script that open simple popup window - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742091521a2420295.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论