如何在div中打开colorbox

时间:2015-09-29 05:15:55

标签: javascript jquery colorbox

其实我想要打开没有弹出窗口的彩色框,它只需要在div中显示隐藏。我们可以将div定位为打开彩盒内容。

<a href='#myGallery' class='group'>click here</a>

<div class=''><!--this must be container of colorbox, and disable popup--> 
    <div id="myGallery"><--some content with photo--></div>
</div>


function _teamPopup(){
   $(".group").colorbox({
     inline:true, 
     rel:'group',
     href:$(this).attr('href'),
     scrolling: false,
     opacity:1,
     width:100+"%",

   });
}

在我的网页上,有很多缩略图,当我点击它时,内容必须显示没有弹出窗口。它可以是下一个,上一个,关闭像彩盒组功能。

请检查下面的图片,你可以得到一些想法。 enter image description here

2 个答案:

答案 0 :(得分:0)

使用jQuery的切换功能隐藏和显示元素内的内容

答案 1 :(得分:0)

为什么你想改变colorbox,如果它的目的正是为了弹出一个画廊?

如果你环顾四周,有些小部件更具体针对您遇到的问题。

检查http://galleria.io/themes/classic/

如果你仍然不喜欢你能找到的东西为什么不在编码大型div来改变它的图像时点击缩略图?

相关问题