如何在Colorbox中以幻灯片形式显示多个div?

jaf*_*ffa 0 jquery lightbox colorbox

假设我有一个由类.eg'.myclass'标识的div列表

在每个div内部将是一些html内容而不是图像.我如何打开colorbox(),以便在点击箭头时,它们会轻弹div?

我看了下面的帖子,这是同样的问题,但他的解决方案让我不知道他是如何工作的:重复的问题

colorbox甚至是正确的插件吗?

Ada*_*son 6

更新:

我知道你已经接受了答案,但这里的方法比目前接受的答案要简洁得多:

http://jsfiddle.net/rc5m7/14/

HTML:

<div class="colorbox">Div #1
    <div style="display:none">
            Data#1 inside div.  This is just a test.
    </div>
</div>

<div class="colorbox">Div #2
    <div style="display:none">
            Data#2 inside div.  This is just a test.
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

JS:

$(document).ready(function() {
    $('div.colorbox').each(function() {
        $(this).colorbox({
            html: $(this).find('div').html(),
            rel: 'group_1'
        });
    });
});
Run Code Online (Sandbox Code Playgroud)