最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ajaxjquery - Script that open simple popup window - Stack Overflow

programmeradmin1浏览0评论

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
Add a ment  | 

2 Answers 2

Reset to default 2

Fancybox 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>';
}});
发布评论

评论列表(0)

  1. 暂无评论