Can you create a colorbox slideshow for a set of divs?
So in colorbox photos can be grouped together to form a slideshow, I would like to be able to use divs as the content of the slideshow instead of images. Is that supported?
Javascript code:
<script>
$(document).ready(function () {
$("div.colorbox").colorbox({ width: "50%", inline: true,slideshow: true, href: function () {
var elementID = $(this).find('div .pop').attr('id');
return "#" + elementID;
}
});
</script>
Html/Css is:
<div class="colorbox" >Div #1
<div style="display:none">
<div id="Div1" class="pop">
Data#1 inside div
</div>
</div>
</div>
<div class="colorbox" >Div #2
<div style="display:none">
<div id="Div2" class="pop">
Data#2 inside div
</div>
</div>
</div>
Any ideas if this can b开发者_运维知识库e done? Thanks
I was able to make it work by doing
$("div.colorbox").colorbox({rel:"my_group"})
精彩评论