简体   繁体   English

如何在div中打开colorbox

[英]How to open colorbox inside div

Actually i want to do open color box without popup and it need to be only show hide inside a div. 实际上我想打开没有弹出框的颜色框,它只需要在div内显示隐藏即可。 can we target a div to open colorbox content. 我们可以将div作为目标来打开colorbox内容吗?

<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+"%",

   });
}

on my web page , there is lot of thumbnails, when i click on it content must display without popup.and it can be next ,prev , close like colorbox group function. 在我的网页上,有很多缩略图,当我单击它时,内容必须显示没有弹出窗口。它可以是next,prev,close,如colorbox group函数。

please check below image and you can get some idea. 请检查下面的图片,您可以了解一些想法。 在此处输入图片说明

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

Why you want to change colorbox if its purpose is exactly to have a gallery popping up? 如果您要更改彩盒的目的是要弹出画廊,为什么要更改它?

If you look around there are widgets more specific for the kind of problem you're having. 如果环顾四周,就会发现一些特定于您遇到的问题的小部件。

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

If you still don't like what you can find around why don't you just code the big div to change its image when clicking on a thumbnail? 如果您仍然不喜欢可以找到的内容,为什么不单击缩略图就只编码big div以更改其图像?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM