答案 0 :(得分:1)
为anchor-tag指定相同的类名,并使用rel参数调用colorbox,如下所示:
$(".classname").colorbox({rel:'classname'});
答案 1 :(得分:1)
您需要在colorbox的设置中添加rel。
所以而不是
jQuery('a.gallery').colorbox({ opacity:0.5, maxWidth:"90%", maxHeight:"90%"});
你需要做类似
的事情jQuery('a.gallery').colorbox({ opacity:0.5, maxWidth:"90%", maxHeight:"90%", rel:"group1" });