我需要从js打开一个colorbox链接( js实际上在站点上的Adobe Edge文档中)
在html中,我会用它打开带有#id-6的内联颜色框:
<a href="?width=90%&height=90%&inline=true#id-6" class="colorbox-inline init-colorbox-inline-processed cboxElement">test </a>但是我不能让它在JS中工作,我没有太多使用JS的经验,所以我尝试了一些选项,但下面的5个选项都不能显示内联颜色框
document.location.href="?width=90%&height=90%&inline=true#id-6";
window.open("?width=90%&height=90%&inline=true#id-6", "_self");
$.colorbox({width:"80%", height:"80%", inline:"true", href:"id-6"});
$.fn.colorbox({href:'#id-6', open:true, inline:true, width:'90%', height:'90%'});
jQuery().colorbox({width:"90%", height:"90%", inline:true, href:"?#id-6"});
... 发布于 2015-01-13 18:34:38
好了,我知道这是怎么回事了.也许对Colorbox和Adobe Edge的集成有更多的参考价值。
jQuery('div').colorbox({
href: "#id-7",
inline:true,
innerWidth:'90%',
innerHeight:'90%',
open:true
});
e.preventDefault();
return false; 并确保您将正确的颜色框类添加到当前div
colorbox-inline init-colorbox-inline-processed cboxElement
https://stackoverflow.com/questions/27895608
复制相似问题