Javascript 颜色框不工作,可能与滑块冲突
我在该站点的测试页面上设置了Colorbox插件: 前三个大图像包装在一个标签中,添加了适当的href和类(从Colorbox演示复制)Javascript 颜色框不工作,可能与滑块冲突,javascript,jquery,colorbox,Javascript,Jquery,Colorbox,我在该站点的测试页面上设置了Colorbox插件: 前三个大图像包装在一个标签中,添加了适当的href和类(从Colorbox演示复制) 但是,当我单击链接时,不会启动任何lightbox。相反,链接只是点击图像本身 我怀疑这两个Jquery插件(Colorbox和RoyalSlider)相互冲突。但是,我也不知道如何判断Colorbox是否正确安装。稍后使用$(window.load()将Colorbox代码放入 替换此代码: $(document).ready(function(){
但是,当我单击链接时,不会启动任何lightbox。相反,链接只是点击图像本身
我怀疑这两个Jquery插件(Colorbox和RoyalSlider)相互冲突。但是,我也不知道如何判断Colorbox是否正确安装。稍后使用
$(window.load()
将Colorbox代码放入
替换此代码:
$(document).ready(function(){
//Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
.
.
.
为此:
$(window).load(function(){
//Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
.
.
.
你可以从这篇文章中了解更多关于两者之间的区别:或者只是在网上搜索
$(window).load(function(){
//Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
.
.
.