简体   繁体   English

jQuery colorbox上没有下一个/上一个按钮

[英]No Next / Prev Button on jQuery colorbox

I'm using jQuery colorbox ( http://www.jacklmoore.com/colorbox/example3/ ) on my website. 我在我的网站上使用jQuery colorbox( http://www.jacklmoore.com/colorbox/example3/ )。 And I'm trying to add multiple iframe box. 而且我正在尝试添加多个iframe框。 It's working except there is no NEXT/PREV button in it. 除了没有NEXT / PREV按钮外,它都在工作。

Here is my code : 这是我的代码:

<script>
$(document).ready(function(){
    $('#group1').colorbox({
        arrowKey: true,
        open: true,
        opacity: 0.5,
        iframe: true,
        innerWidth:1000,  
        innerHeight:600,
        scrolling:false,
        rel:"group1"
        }); 
});
</script>

<a id="group1" href="http://tokobagus.com">Tokobagus</a>
<a id="group1" href="http://berniaga.com">Kaskus</a>

As you can see, there's arrowKey: true there, but the arrow is still not showing. 如您所见,那里有arrowKey:true,但是箭头仍然没有显示。 Any idea? 任何想法?

Thank you... 谢谢...

Since id is unique, try to change it to class for both of your anchors: 由于id是唯一的,请尝试将其更改为两个锚点的class:

<a class="group1" href="http://tokobagus.com">Tokobagus</a>
<a class="group1" href="http://berniaga.com">Kaskus</a>

and use $('.group1') instead of $('#group1') 并使用$('.group1')代替$('#group1')

Just You have to use class instead of id . 只是您必须使用class而不是id check the solution in 检查解决方案

http://jsfiddle.net/2kda6/

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

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