<link href="https://www.feti072.com/inc/js/jquery.color-box/colorbox.css" rel="stylesheet" />
<script type="text/javascript" src="https://www.feti072.com/inc/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="https://www.feti072.com/inc/js/jquery.color-box/jquery.colorbox.js"></script>
<h4>一组图片</h4>
<p><a class="group1" href="https://www.shadowbox-js.com/gallery/mustang/red.jpg">图 1</a></p>
<p><a class="group1" href="https://www.shadowbox-js.com/gallery/mustang/blue.jpg">图 2</a></p>
<p><a class="group1" href="https://www.shadowbox-js.com/gallery/mustang/grey.jpg">图 3</a></p>
<script>
$(document).ready(function(){
$(".group1").colorbox({rel:'group1'});
});
</script>
<h4>外站MP4方式1</h4>
<a class="lightboxed" href="http://www.w3schools.com/html/mov_bbb.mp4">播放</a>
<script>
$('a.lightboxed').colorbox({iframe:true, width:"80%", height:"80%"});
</script>
<br>
<h4>外站MP4方式2,模拟作者youtube视频写法</h4>
<a class='youtube cboxElement' href="http://www.w3schools.com/html/mov_bbb.mp4">播放</a>
<script>
$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
</script>
<br>
<h4>外站MP4方式3,模拟作者的Outside写法</h4>
<a class='iframe cboxElement' href="http://www.w3schools.com/html/mov_bbb.mp4">播放</a>
</body>
</html>
有熟悉colorbox的请指点一下啊!
After load() you need to reinitialize colorbox for newly created ".popup_class1". Also add ".popup_class1" to load link since without it you'll have double #reload in your parent.
parent.$('#reload').load(parent.document.URL + ' #reload .popup_class1',
function(){
parent.$(".popup_class1").colorbox({iframe:true, innerWidth:1100, innerHeight:550,overlayClose:true});
});