Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/412.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 颜色框不工作,可能与滑块冲突_Javascript_Jquery_Colorbox - Fatal编程技术网

Javascript 颜色框不工作,可能与滑块冲突

Javascript 颜色框不工作,可能与滑块冲突,javascript,jquery,colorbox,Javascript,Jquery,Colorbox,我在该站点的测试页面上设置了Colorbox插件: 前三个大图像包装在一个标签中,添加了适当的href和类(从Colorbox演示复制) 但是,当我单击链接时,不会启动任何lightbox。相反,链接只是点击图像本身 我怀疑这两个Jquery插件(Colorbox和RoyalSlider)相互冲突。但是,我也不知道如何判断Colorbox是否正确安装。稍后使用$(window.load()将Colorbox代码放入 替换此代码: $(document).ready(function(){

我在该站点的测试页面上设置了Colorbox插件:

前三个大图像包装在一个标签中,添加了适当的href和类(从Colorbox演示复制)


但是,当我单击链接时,不会启动任何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'});
  .
  .
  .