首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >colorbox头痛

colorbox头痛
EN

Stack Overflow用户
提问于 2013-01-10 15:15:23
回答 1查看 111关注 0票数 0

我制作了一个从xml文件中提取信息的播放列表。单击超链接即可调用视频。我正在尝试添加彩盒,我已经让彩盒出现了,但我想不出如何让视频打开到彩盒中。下面是我使用的代码:

代码语言:javascript
复制
$(function() {
   /* be sure data is defined here */
$( data ).find("chapter").each(function() {

    var $chapter = $('<li class="chaptertitle"/>')
    .append('<img class="img-swap" src="http://sandbox.kalliance.com/demo/images/plus.png" class="img-swap" />')
    .append('<p align="left" class="pc-left">' + $(this).attr("label") + '<p align="right" class="pc-right">Duration</p>')
    .append('<ul/>')
    .appendTo( '#screens' );
    $(this).find('screen').each(function() {
        time=$(this).find('screen').attr('duration')
        $("#screens").append(time)
         $('#screens ul:last')
         .append('<li class="screentitle"/>')
         .find('li:last')
         .append('<p align="left" class="p-left"><a href="'+streamer+''+filenum+'/streams/_definst_/' + $(this).attr('path') + '" id="colorbox-load">' + $(this).attr('label') + ' </a></p>  <p align="right" class="p-right">'+ $(this).attr("duration")+'</p>');

         //tgonzalez - create the modal window for the video

       $("#colorbox-load").click(function() {
        $.colorbox({inline:true, width:960, height:540, opacity:0.8 });
EN

回答 1

Stack Overflow用户

发布于 2013-01-10 15:43:49

jquery的colorbox API引用了您试图在colorbox中打开的容器。尝尝这个

代码语言:javascript
复制
$.colorbox({href: "#divIdHere", inline:true, width:960, height:540, opacity:0.8 });
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14252620

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档